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
MigNov/libminCrypt/src/byteops.c
int apply_binary_operation_on_byte(int tbit, int kbit, int operation) { if (operation == 0x00) { return ((tbit == '1') || (kbit == '1')) ? '1' : '0'; } else if (operation == 0x01) { return ((tbit == '1') && (kbit == '1')) ? '1' : '0'; } else if (operation == 0x02) { return (((tbit == '0') && (kbit == '1')) || ((tbit == '1') && (kbit == '0'))) ? '1' : '0'; } return '?'; }
int apply_binary_operation_on_byte(inttbit, intkbit, intoperation)
int apply_binary_operation_on_byte(int tbit, int kbit, int operation)
apply_binary_operation_on_byte
[ "int", "int", "int", "int" ]
{ "code": [ ".globl apply_binary_operation_on_byte\n.type apply_binary_operation_on_byte, @function\napply_binary_operation_on_byte:\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\tcmpl\t$0, -12(%rbp)\n\tjne\t.L2\n\tcmpl\t$49, -4(%rbp)\n\tje\t.L3\n\tcmpl\t$49, -8(%rbp)\n\tjne\t.L4\n.L3:\n\tmovl\t$49, %eax\n\tjmp\t.L6\n.L4:\n\tmovl\t$48, %eax\n\tjmp\t.L6\n.L2:\n\tcmpl\t$1, -12(%rbp)\n\tjne\t.L7\n\tcmpl\t$49, -4(%rbp)\n\tjne\t.L8\n\tcmpl\t$49, -8(%rbp)\n\tjne\t.L8\n\tmovl\t$49, %eax\n\tjmp\t.L6\n.L8:\n\tmovl\t$48, %eax\n\tjmp\t.L6\n.L7:\n\tcmpl\t$2, -12(%rbp)\n\tjne\t.L10\n\tcmpl\t$48, -4(%rbp)\n\tjne\t.L11\n\tcmpl\t$49, -8(%rbp)\n\tje\t.L12\n.L11:\n\tcmpl\t$49, -4(%rbp)\n\tjne\t.L13\n\tcmpl\t$48, -8(%rbp)\n\tjne\t.L13\n.L12:\n\tmovl\t$49, %eax\n\tjmp\t.L6\n.L13:\n\tmovl\t$48, %eax\n\tjmp\t.L6\n.L10:\n\tmovl\t$63, %eax\n.L6:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl apply_binary_operation_on_byte\n.type apply_binary_operation_on_byte, @function\napply_binary_operation_on_byte:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edx, %edx\n\tjne\t.L2\n\tcmpl\t$49, %edi\n\tje\t.L31\n\tmovl\t$48, %eax\n\tcmpl\t$49, %esi\n\tjne\t.L1\n\tjmp\t.L31\n.L2:\n\tcmpl\t$1, %edx\n\tjne\t.L5\n\tcmpl\t$49, %edi\n\tjne\t.L11\n\tcmpl\t$49, %esi\n\tjmp\t.L33\n.L5:\n\tmovl\t$63, %eax\n\tcmpl\t$2, %edx\n\tjne\t.L1\n\tcmpl\t$48, %edi\n\tjne\t.L13\n\tmovl\t$49, %eax\n\tcmpl\t$49, %esi\n\tje\t.L1\n.L13:\n\tcmpl\t$49, %edi\n\tjne\t.L11\n\tcmpl\t$48, %esi\n.L33:\n\tjne\t.L11\n.L31:\n\tmovl\t$49, %eax\n\tret\n.L11:\n\tmovl\t$48, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl apply_binary_operation_on_byte\n.type apply_binary_operation_on_byte, @function\napply_binary_operation_on_byte:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edx, %edx\n\tje\t.L33\n\tcmpl\t$1, %edx\n\tje\t.L34\n\tmovl\t$63, %eax\n\tcmpl\t$2, %edx\n\tje\t.L35\n.L1:\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L33:\n\tcmpl\t$49, %edi\n\tje\t.L31\n\tmovl\t$48, %eax\n\tcmpl\t$49, %esi\n\tjne\t.L1\n.L31:\n\tmovl\t$49, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L35:\n\tcmpl\t$48, %edi\n\tjne\t.L13\n\tmovl\t$49, %eax\n\tcmpl\t$49, %esi\n\tje\t.L1\n.L13:\n\tcmpl\t$49, %edi\n\tjne\t.L11\n\tcmpl\t$48, %esi\n\tje\t.L31\n.L11:\n\tmovl\t$48, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L34:\n\tcmpl\t$49, %edi\n\tjne\t.L11\n\tcmpl\t$49, %esi\n\tje\t.L31\n\tjmp\t.L11\n\t.cfi_endproc\n\n", ".global apply_binary_operation_on_byte\n.type apply_binary_operation_on_byte, %function\napply_binary_operation_on_byte:\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, 4]\n\tcmp\tw0, 0\n\tbne\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 49\n\tbeq\t.L3\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 49\n\tbne\t.L4\n.L3:\n\tmov\tw0, 49\n\tb\t.L6\n.L4:\n\tmov\tw0, 48\n\tb\t.L6\n.L2:\n\tldr\tw0, [sp, 4]\n\tcmp\tw0, 1\n\tbne\t.L7\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 49\n\tbne\t.L8\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 49\n\tbne\t.L8\n\tmov\tw0, 49\n\tb\t.L6\n.L8:\n\tmov\tw0, 48\n\tb\t.L6\n.L7:\n\tldr\tw0, [sp, 4]\n\tcmp\tw0, 2\n\tbne\t.L10\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 48\n\tbne\t.L11\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 49\n\tbeq\t.L12\n.L11:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 49\n\tbne\t.L13\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 48\n\tbne\t.L13\n.L12:\n\tmov\tw0, 49\n\tb\t.L6\n.L13:\n\tmov\tw0, 48\n\tb\t.L6\n.L10:\n\tmov\tw0, 63\n.L6:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global apply_binary_operation_on_byte\n.type apply_binary_operation_on_byte, %function\napply_binary_operation_on_byte:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw3, w0\n\tcbnz\tw2, .L2\n\tcmp\tw0, 49\n\tmov\tw0, 49\n\tccmp\tw1, w0, 4, ne\n.L10:\n\tcset\tw0, eq\n\tadd\tw0, w0, 48\n.L1:\n\tret\n.L2:\n\tcmp\tw2, 1\n\tbne\t.L4\n\tcmp\tw0, 49\n\tmov\tw0, 49\n.L11:\n\tccmp\tw1, w0, 0, eq\n\tb\t.L10\n.L4:\n\tcmp\tw2, 2\n\tbne\t.L7\n\tcmp\tw3, 48\n\tmov\tw0, 49\n\tccmp\tw1, w0, 0, eq\n\tbeq\t.L1\n\tcmp\tw3, w0\n\tmov\tw0, 48\n\tb\t.L11\n.L7:\n\tmov\tw0, 63\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global apply_binary_operation_on_byte\n.type apply_binary_operation_on_byte, %function\napply_binary_operation_on_byte:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw3, w0\n\tcbz\tw2, .L11\n\tcmp\tw2, 1\n\tbeq\t.L12\n\tcmp\tw2, 2\n\tmov\tw0, 63\n\tbeq\t.L13\n.L1:\n\tret\n\t.p2align 2,,3\n.L11:\n\tcmp\tw0, 49\n\tmov\tw0, 49\n\tccmp\tw1, w0, 4, ne\n\tcset\tw0, eq\n\tadd\tw0, w0, 48\n\tret\n\t.p2align 2,,3\n.L13:\n\tcmp\tw3, 48\n\tmov\tw2, 49\n\tccmp\tw1, w2, 0, eq\n\tmov\tw0, w2\n\tbeq\t.L1\n\tcmp\tw3, w2\n\tmov\tw0, 48\n\tccmp\tw1, w0, 0, eq\n\tcset\tw0, eq\n\tadd\tw0, w0, 48\n\tret\n\t.p2align 2,,3\n.L12:\n\tcmp\tw0, 49\n\tmov\tw0, 49\n\tccmp\tw1, w0, 0, eq\n\tcset\tw0, eq\n\tadd\tw0, w0, 48\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, 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", "1", "72" ], "var": [ "tbit", "kbit", "operation" ] }, { "value": [ "41", "13", "8" ], "var": [ "tbit", "kbit", "operation" ] }, { "value": [ "100", "17", "13" ], "var": [ "tbit", "kbit", "operation" ] }, { "value": [ "59", "75", "86" ], "var": [ "tbit", "kbit", "operation" ] }, { "value": [ "101", "43", "101" ], "var": [ "tbit", "kbit", "operation" ] }, { "value": [ "123", "43", "2" ], "var": [ "tbit", "kbit", "operation" ] }, { "value": [ "34", "122", "103" ], "var": [ "tbit", "kbit", "operation" ] }, { "value": [ "71", "66", "106" ], "var": [ "tbit", "kbit", "operation" ] }, { "value": [ "116", "109", "60" ], "var": [ "tbit", "kbit", "operation" ] }, { "value": [ "89", "0", "107" ], "var": [ "tbit", "kbit", "operation" ] } ], "output": [ { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "48" ], "var": [ "returnv" ] }, { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "63" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_49jxcr3cd_.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 tbit, int kbit, int operation, 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 tbit = input_json["tbit"]; int kbit = input_json["kbit"]; int operation = input_json["operation"]; clock_t begin = clock(); int returnv = apply_binary_operation_on_byte(tbit, kbit, operation); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(tbit, kbit, operation, returnv); }
master
null
{"livein": ["tbit", "kbit", "operation"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "apply_binary_operation_on_byte", "funargs": ["tbit", "kbit", "operation"], "typemap": {"tbit": "int32", "kbit": "int32", "operation": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_49jxcr3cd_.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
eusafe/libgate/src/gp_processor.c
int cb_dev_sched_default() { return 1; }
int cb_dev_sched_default()
int cb_dev_sched_default()
cb_dev_sched_default
[ "int", "" ]
{ "code": [ ".globl cb_dev_sched_default\n.type cb_dev_sched_default, @function\ncb_dev_sched_default:\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$1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl cb_dev_sched_default\n.type cb_dev_sched_default, @function\ncb_dev_sched_default:\n.LFB46:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl cb_dev_sched_default\n.type cb_dev_sched_default, @function\ncb_dev_sched_default:\n.LFB61:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global cb_dev_sched_default\n.type cb_dev_sched_default, %function\ncb_dev_sched_default:\n.LFB6:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global cb_dev_sched_default\n.type cb_dev_sched_default, %function\ncb_dev_sched_default:\n.LFB46:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global cb_dev_sched_default\n.type cb_dev_sched_default, %function\ncb_dev_sched_default:\n.LFB61:\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 <stdint.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.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": [], "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_63vor86t8k.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = cb_dev_sched_default(); clock_t end = 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": "cb_dev_sched_default", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63vor86t8k.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
gandaro/piebnc/src/p_dcc.c
int checkdccs() { # 496 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gandaro/piebnc/refs/heads/master/src/p_dcc.c" return 0x0; }
int checkdccs()
int checkdccs()
checkdccs
[ "int", "" ]
{ "code": [ ".globl checkdccs\n.type checkdccs, @function\ncheckdccs:\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 checkdccs\n.type checkdccs, @function\ncheckdccs:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl checkdccs\n.type checkdccs, @function\ncheckdccs:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global checkdccs\n.type checkdccs, %function\ncheckdccs:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global checkdccs\n.type checkdccs, %function\ncheckdccs:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global checkdccs\n.type checkdccs, %function\ncheckdccs:\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_47sa0fhm6y.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = checkdccs(); clock_t end = 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": "checkdccs", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_47sa0fhm6y.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
philsmd/sharpfin/src/libreciva/src/lcd/lcd_devel.c
char lcd_hwchr(char *str, int pos) { int i ; unsigned long int c=0 ; if (str==NULL) return '\0' ; for (i=0; str[i]!='\0' && i<pos; ) { if ((str[i]&'\x80')==0) i++ ; else { i++ ; while ((str[i]&'\xC0')=='\x80') i++ ; } } if ((str[i]&'\x80')==0) return str[i] ; if ((str[i]&'\xE0')=='\xC0') { c|=(str[i]&'\x1F') ; if (str[i+1]!='\0') { c<<=5 ; c|=str[i+1]&'\x3F' ; } } if ((str[i]&'\xF0')=='\xE0') { c|=(str[i]&'\x0F') ; if (str[i+1]!='\0') { c<<=4 ; c|=str[i+1]&'\x3F' ; } if (str[i+2]!='\0') { c<<=6 ; c|=str[i+2]&'\x3F' ; } } if ((str[i]&'\xF8')=='\xF0') { c|=(str[i]&'\x07') ; if (str[i+1]!='\0') { c<<=3 ; c|=str[i+1]&'\x3F' ; } if (str[i+2]!='\0') { c<<=6 ; c|=str[i+2]&'\x3F' ; } if (str[i+3]!='\0') { c<<=6 ; c|=str[i+3]&'\x3F' ; } } switch(c) { case 0xE000: return 'E' ; case 0xE001: return 'N' ; case 0xE002: return 'D' ; case 0xE003: return 'E' ; case 0xE004: return 'N' ; case 0xE005: return 'D' ; case 0xE006: return 'V' ; case 0xE007: return 'v' ; case 0xE008: return '<' ; case 0xE009: return '>' ; case 0xE00A: return 'p' ; case 0xE00B: return 'b' ; case 0xE00C: return 'f' ; case 0xE00D: return 'r' ; case 0xE00E: return 's' ; case 0xE00F: return 'x' ; default: return '?' ; } }
char lcd_hwchr(char *str, intpos)
char lcd_hwchr(char *str, int pos)
lcd_hwchr
[ "char", "char *", "int" ]
{ "code": [ ".globl lcd_hwchr\n.type lcd_hwchr, @function\nlcd_hwchr:\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\tmovq\t$0, -8(%rbp)\n\tcmpq\t$0, -24(%rbp)\n\tjne\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, -12(%rbp)\n\tjmp\t.L4\n.L9:\n\tmovl\t-12(%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\tjs\t.L5\n\taddl\t$1, -12(%rbp)\n\tjmp\t.L4\n.L5:\n\taddl\t$1, -12(%rbp)\n\tjmp\t.L6\n.L7:\n\taddl\t$1, -12(%rbp)\n.L6:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tandl\t$-64, %eax\n\tcmpb\t$-128, %al\n\tje\t.L7\n.L4:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L8\n\tmovl\t-12(%rbp), %eax\n\tcmpl\t-28(%rbp), %eax\n\tjl\t.L9\n.L8:\n\tmovl\t-12(%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\tjs\t.L10\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tjmp\t.L3\n.L10:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tandl\t$-32, %eax\n\tcmpb\t$-64, %al\n\tjne\t.L11\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbq\t%al, %rax\n\tandl\t$31, %eax\n\torq\t%rax, -8(%rbp)\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L11\n\tsalq\t$5, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L11:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tandl\t$-16, %eax\n\tcmpb\t$-32, %al\n\tjne\t.L12\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbq\t%al, %rax\n\tandl\t$15, %eax\n\torq\t%rax, -8(%rbp)\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L13\n\tsalq\t$4, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L13:\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L12\n\tsalq\t$6, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L12:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tandl\t$-8, %eax\n\tcmpb\t$-16, %al\n\tjne\t.L14\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbq\t%al, %rax\n\tandl\t$7, %eax\n\torq\t%rax, -8(%rbp)\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L15\n\tsalq\t$3, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L15:\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L16\n\tsalq\t$6, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L16:\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L14\n\tsalq\t$6, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L14:\n\tmovq\t-8(%rbp), %rax\n\tsubq\t$57344, %rax\n\tcmpq\t$15, %rax\n\tja\t.L17\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\t.L19(%rip), %rax\n\tmovl\t(%rdx,%rax), %eax\n\tcltq\n\tleaq\t.L19(%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.L19:\n\t.long\t.L34-.L19\n\t.long\t.L33-.L19\n\t.long\t.L32-.L19\n\t.long\t.L31-.L19\n\t.long\t.L30-.L19\n\t.long\t.L29-.L19\n\t.long\t.L28-.L19\n\t.long\t.L27-.L19\n\t.long\t.L26-.L19\n\t.long\t.L25-.L19\n\t.long\t.L24-.L19\n\t.long\t.L23-.L19\n\t.long\t.L22-.L19\n\t.long\t.L21-.L19\n\t.long\t.L20-.L19\n\t.long\t.L18-.L19\n\t.text\n.L34:\n\tmovl\t$69, %eax\n\tjmp\t.L3\n.L33:\n\tmovl\t$78, %eax\n\tjmp\t.L3\n.L32:\n\tmovl\t$68, %eax\n\tjmp\t.L3\n.L31:\n\tmovl\t$69, %eax\n\tjmp\t.L3\n.L30:\n\tmovl\t$78, %eax\n\tjmp\t.L3\n.L29:\n\tmovl\t$68, %eax\n\tjmp\t.L3\n.L28:\n\tmovl\t$86, %eax\n\tjmp\t.L3\n.L27:\n\tmovl\t$118, %eax\n\tjmp\t.L3\n.L26:\n\tmovl\t$60, %eax\n\tjmp\t.L3\n.L25:\n\tmovl\t$62, %eax\n\tjmp\t.L3\n.L24:\n\tmovl\t$112, %eax\n\tjmp\t.L3\n.L23:\n\tmovl\t$98, %eax\n\tjmp\t.L3\n.L22:\n\tmovl\t$102, %eax\n\tjmp\t.L3\n.L21:\n\tmovl\t$114, %eax\n\tjmp\t.L3\n.L20:\n\tmovl\t$115, %eax\n\tjmp\t.L3\n.L18:\n\tmovl\t$120, %eax\n\tjmp\t.L3\n.L17:\n\tmovl\t$63, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl lcd_hwchr\n.type lcd_hwchr, @function\nlcd_hwchr:\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\tmovq\t$0, -8(%rbp)\n\tcmpq\t$0, -24(%rbp)\n\tjne\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, -12(%rbp)\n\tjmp\t.L4\n.L9:\n\tmovl\t-12(%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\tjs\t.L5\n\taddl\t$1, -12(%rbp)\n\tjmp\t.L4\n.L5:\n\taddl\t$1, -12(%rbp)\n\tjmp\t.L6\n.L7:\n\taddl\t$1, -12(%rbp)\n.L6:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tandl\t$-64, %eax\n\tcmpb\t$-128, %al\n\tje\t.L7\n.L4:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L8\n\tmovl\t-12(%rbp), %eax\n\tcmpl\t-28(%rbp), %eax\n\tjl\t.L9\n.L8:\n\tmovl\t-12(%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\tjs\t.L10\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tjmp\t.L3\n.L10:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tandl\t$-32, %eax\n\tcmpb\t$-64, %al\n\tjne\t.L11\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbq\t%al, %rax\n\tandl\t$31, %eax\n\torq\t%rax, -8(%rbp)\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L11\n\tsalq\t$5, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L11:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tandl\t$-16, %eax\n\tcmpb\t$-32, %al\n\tjne\t.L12\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbq\t%al, %rax\n\tandl\t$15, %eax\n\torq\t%rax, -8(%rbp)\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L13\n\tsalq\t$4, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L13:\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L12\n\tsalq\t$6, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L12:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tandl\t$-8, %eax\n\tcmpb\t$-16, %al\n\tjne\t.L14\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbq\t%al, %rax\n\tandl\t$7, %eax\n\torq\t%rax, -8(%rbp)\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L15\n\tsalq\t$3, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L15:\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L16\n\tsalq\t$6, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L16:\n\tmovl\t-12(%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\ttestb\t%al, %al\n\tje\t.L14\n\tsalq\t$6, -8(%rbp)\n\tmovl\t-12(%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\tmovsbq\t%al, %rax\n\tandl\t$63, %eax\n\torq\t%rax, -8(%rbp)\n.L14:\n\tmovq\t-8(%rbp), %rax\n\tsubq\t$57344, %rax\n\tcmpq\t$15, %rax\n\tja\t.L17\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\t.L19(%rip), %rax\n\tmovl\t(%rdx,%rax), %eax\n\tcltq\n\tleaq\t.L19(%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.L19:\n\t.long\t.L34-.L19\n\t.long\t.L33-.L19\n\t.long\t.L32-.L19\n\t.long\t.L31-.L19\n\t.long\t.L30-.L19\n\t.long\t.L29-.L19\n\t.long\t.L28-.L19\n\t.long\t.L27-.L19\n\t.long\t.L26-.L19\n\t.long\t.L25-.L19\n\t.long\t.L24-.L19\n\t.long\t.L23-.L19\n\t.long\t.L22-.L19\n\t.long\t.L21-.L19\n\t.long\t.L20-.L19\n\t.long\t.L18-.L19\n\t.text\n.L34:\n\tmovl\t$69, %eax\n\tjmp\t.L3\n.L33:\n\tmovl\t$78, %eax\n\tjmp\t.L3\n.L32:\n\tmovl\t$68, %eax\n\tjmp\t.L3\n.L31:\n\tmovl\t$69, %eax\n\tjmp\t.L3\n.L30:\n\tmovl\t$78, %eax\n\tjmp\t.L3\n.L29:\n\tmovl\t$68, %eax\n\tjmp\t.L3\n.L28:\n\tmovl\t$86, %eax\n\tjmp\t.L3\n.L27:\n\tmovl\t$118, %eax\n\tjmp\t.L3\n.L26:\n\tmovl\t$60, %eax\n\tjmp\t.L3\n.L25:\n\tmovl\t$62, %eax\n\tjmp\t.L3\n.L24:\n\tmovl\t$112, %eax\n\tjmp\t.L3\n.L23:\n\tmovl\t$98, %eax\n\tjmp\t.L3\n.L22:\n\tmovl\t$102, %eax\n\tjmp\t.L3\n.L21:\n\tmovl\t$114, %eax\n\tjmp\t.L3\n.L20:\n\tmovl\t$115, %eax\n\tjmp\t.L3\n.L18:\n\tmovl\t$120, %eax\n\tjmp\t.L3\n.L17:\n\tmovl\t$63, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl lcd_hwchr\n.type lcd_hwchr, @function\nlcd_hwchr:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\txorl\t%edx, %edx\n\ttestq\t%rdi, %rdi\n\tje\t.L1\n.L3:\n\tmovslq\t%edx, %r8\n\tmovb\t(%rdi,%r8), %al\n\ttestb\t%al, %al\n\tje\t.L1\n\tcmpl\t%esi, %edx\n\tjge\t.L40\n\tincl\t%edx\n\ttestb\t%al, %al\n\tjns\t.L3\n\tmovslq\t%edx, %rax\n.L5:\n\tmovb\t(%rdi,%rax), %cl\n\tmovl\t%eax, %edx\n\tincq\t%rax\n\tandl\t$-64, %ecx\n\tcmpb\t$-128, %cl\n\tje\t.L5\n\tjmp\t.L3\n.L40:\n\ttestb\t%al, %al\n\tjns\t.L1\n\tmovl\t%eax, %ecx\n\txorl\t%edx, %edx\n\tandl\t$-32, %ecx\n\tcmpb\t$-64, %cl\n\tjne\t.L7\n\tmovb\t1(%rdi,%r8), %cl\n\tmovq\t%rax, %rdx\n\tandl\t$31, %edx\n\ttestb\t%cl, %cl\n\tje\t.L7\n\tsalq\t$5, %rdx\n\tandl\t$63, %ecx\n\torq\t%rcx, %rdx\n.L7:\n\tmovl\t%eax, %ecx\n\tandl\t$-16, %ecx\n\tcmpb\t$-32, %cl\n\tjne\t.L8\n\tmovq\t%rax, %rcx\n\tandl\t$15, %ecx\n\torq\t%rcx, %rdx\n\tmovb\t1(%rdi,%r8), %cl\n\ttestb\t%cl, %cl\n\tje\t.L9\n\tsalq\t$4, %rdx\n\tandl\t$63, %ecx\n\torq\t%rcx, %rdx\n.L9:\n\tmovb\t2(%rdi,%r8), %cl\n\ttestb\t%cl, %cl\n\tje\t.L8\n\tsalq\t$6, %rdx\n\tandl\t$63, %ecx\n\torq\t%rcx, %rdx\n.L8:\n\tmovl\t%eax, %ecx\n\tandl\t$-8, %ecx\n\tcmpb\t$-16, %cl\n\tjne\t.L10\n\tandl\t$7, %eax\n\torq\t%rax, %rdx\n\tmovb\t1(%rdi,%r8), %al\n\ttestb\t%al, %al\n\tje\t.L11\n\tsalq\t$3, %rdx\n\tandl\t$63, %eax\n\torq\t%rax, %rdx\n.L11:\n\tmovb\t2(%rdi,%r8), %al\n\ttestb\t%al, %al\n\tje\t.L12\n\tsalq\t$6, %rdx\n\tandl\t$63, %eax\n\torq\t%rax, %rdx\n.L12:\n\tmovb\t3(%rdi,%r8), %al\n\ttestb\t%al, %al\n\tje\t.L10\n\tsalq\t$6, %rdx\n\tandl\t$63, %eax\n\torq\t%rax, %rdx\n.L10:\n\tleaq\t-57344(%rdx), %rcx\n\tmovb\t$63, %al\n\tcmpq\t$15, %rcx\n\tja\t.L1\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovb\t-57344(%rax,%rdx), %al\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl lcd_hwchr\n.type lcd_hwchr, @function\nlcd_hwchr:\n.LFB48:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\txorl\t%edx, %edx\n\ttestq\t%rdi, %rdi\n\tje\t.L1\n.L3:\n\tmovslq\t%edx, %r8\n\tmovb\t(%rdi,%r8), %al\n\ttestb\t%al, %al\n\tje\t.L1\n\tcmpl\t%esi, %edx\n\tjge\t.L40\n\tincl\t%edx\n\ttestb\t%al, %al\n\tjns\t.L3\n\tmovslq\t%edx, %rax\n.L5:\n\tmovb\t(%rdi,%rax), %cl\n\tmovl\t%eax, %edx\n\tincq\t%rax\n\tandl\t$-64, %ecx\n\tcmpb\t$-128, %cl\n\tje\t.L5\n\tjmp\t.L3\n.L40:\n\ttestb\t%al, %al\n\tjns\t.L1\n\tmovl\t%eax, %ecx\n\txorl\t%edx, %edx\n\tandl\t$-32, %ecx\n\tcmpb\t$-64, %cl\n\tjne\t.L7\n\tmovb\t1(%rdi,%r8), %cl\n\tmovq\t%rax, %rdx\n\tandl\t$31, %edx\n\ttestb\t%cl, %cl\n\tje\t.L7\n\tsalq\t$5, %rdx\n\tandl\t$63, %ecx\n\torq\t%rcx, %rdx\n.L7:\n\tmovl\t%eax, %ecx\n\tandl\t$-16, %ecx\n\tcmpb\t$-32, %cl\n\tjne\t.L8\n\tmovq\t%rax, %rcx\n\tandl\t$15, %ecx\n\torq\t%rcx, %rdx\n\tmovb\t1(%rdi,%r8), %cl\n\ttestb\t%cl, %cl\n\tje\t.L9\n\tsalq\t$4, %rdx\n\tandl\t$63, %ecx\n\torq\t%rcx, %rdx\n.L9:\n\tmovb\t2(%rdi,%r8), %cl\n\ttestb\t%cl, %cl\n\tje\t.L8\n\tsalq\t$6, %rdx\n\tandl\t$63, %ecx\n\torq\t%rcx, %rdx\n.L8:\n\tmovl\t%eax, %ecx\n\tandl\t$-8, %ecx\n\tcmpb\t$-16, %cl\n\tjne\t.L10\n\tandl\t$7, %eax\n\torq\t%rax, %rdx\n\tmovb\t1(%rdi,%r8), %al\n\ttestb\t%al, %al\n\tje\t.L11\n\tsalq\t$3, %rdx\n\tandl\t$63, %eax\n\torq\t%rax, %rdx\n.L11:\n\tmovb\t2(%rdi,%r8), %al\n\ttestb\t%al, %al\n\tje\t.L12\n\tsalq\t$6, %rdx\n\tandl\t$63, %eax\n\torq\t%rax, %rdx\n.L12:\n\tmovb\t3(%rdi,%r8), %al\n\ttestb\t%al, %al\n\tje\t.L10\n\tsalq\t$6, %rdx\n\tandl\t$63, %eax\n\torq\t%rax, %rdx\n.L10:\n\tleaq\t-57344(%rdx), %rcx\n\tmovb\t$63, %al\n\tcmpq\t$15, %rcx\n\tja\t.L1\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovb\t-57344(%rax,%rdx), %al\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl lcd_hwchr\n.type lcd_hwchr, @function\nlcd_hwchr:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestq\t%rdi, %rdi\n\tje\t.L13\n\tmovzbl\t(%rdi), %r8d\n\ttestb\t%r8b, %r8b\n\tje\t.L1\n\ttestl\t%esi, %esi\n\tjle\t.L14\n\txorl\t%edx, %edx\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tleal\t1(%rdx), %eax\n\ttestb\t%r8b, %r8b\n\tmovslq\t%eax, %rcx\n\tmovzbl\t(%rdi,%rcx), %r9d\n\tmovl\t%r9d, %r8d\n\tjs\t.L39\n.L36:\n\tmovl\t%eax, %edx\n.L4:\n\ttestb\t%r8b, %r8b\n\tje\t.L1\n\tcmpl\t%esi, %edx\n\tjl\t.L6\n.L3:\n\ttestb\t%r8b, %r8b\n\tjns\t.L1\n\tmovl\t%r8d, %eax\n\tandl\t$-32, %eax\n\tcmpb\t$-64, %al\n\tje\t.L37\n\tmovl\t%r8d, %eax\n\tandl\t$-16, %eax\n\tcmpb\t$-32, %al\n\tjne\t.L40\n.L37:\n\tmovl\t$63, %r8d\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L39:\n\tandl\t$-64, %r8d\n\tcmpb\t$-128, %r8b\n\tjne\t.L16\n\tleal\t2(%rdx), %eax\n\tcltq\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tmovzbl\t(%rdi,%rax), %r8d\n\tmovl\t%eax, %edx\n\tmovq\t%rax, %rcx\n\taddq\t$1, %rax\n\tmovl\t%r8d, %r9d\n\tandl\t$-64, %r9d\n\tcmpb\t$-128, %r9b\n\tje\t.L5\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L40:\n\tmovl\t%r8d, %eax\n\tandl\t$-8, %eax\n\tcmpb\t$-16, %al\n\tjne\t.L37\n\tmovzbl\t1(%rdi,%rcx), %eax\n\tandl\t$7, %r8d\n\ttestb\t%al, %al\n\tje\t.L8\n\tsalq\t$3, %r8\n\tandl\t$63, %eax\n\torq\t%rax, %r8\n.L8:\n\tmovzbl\t2(%rdi,%rcx), %eax\n\ttestb\t%al, %al\n\tje\t.L9\n\tandl\t$63, %eax\n\tsalq\t$6, %r8\n\torq\t%rax, %r8\n\tmovzbl\t3(%rdi,%rcx), %eax\n\ttestb\t%al, %al\n\tjne\t.L12\n.L10:\n\tleaq\t-57344(%r8), %rax\n\tcmpq\t$15, %rax\n\tja\t.L37\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovzbl\t-57344(%rax,%r8), %r8d\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L13:\n\txorl\t%r8d, %r8d\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L16:\n\tmovl\t%r9d, %r8d\n\tjmp\t.L36\n.L9:\n\tmovzbl\t3(%rdi,%rcx), %eax\n\ttestb\t%al, %al\n\tje\t.L37\n.L12:\n\tsalq\t$6, %r8\n\tandl\t$63, %eax\n\torq\t%rax, %r8\n\tjmp\t.L10\n.L14:\n\txorl\t%ecx, %ecx\n\tjmp\t.L3\n\t.cfi_endproc\n\n", ".globl lcd_hwchr\n.type lcd_hwchr, @function\nlcd_hwchr:\n.LFB63:\n\t.cfi_startproc\n\tendbr64\n\ttestq\t%rdi, %rdi\n\tje\t.L13\n\tmovzbl\t(%rdi), %r8d\n\ttestb\t%r8b, %r8b\n\tje\t.L1\n\ttestl\t%esi, %esi\n\tjle\t.L14\n\txorl\t%edx, %edx\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tleal\t1(%rdx), %eax\n\ttestb\t%r8b, %r8b\n\tmovslq\t%eax, %rcx\n\tmovzbl\t(%rdi,%rcx), %r9d\n\tmovl\t%r9d, %r8d\n\tjs\t.L39\n.L36:\n\tmovl\t%eax, %edx\n.L4:\n\ttestb\t%r8b, %r8b\n\tje\t.L1\n\tcmpl\t%esi, %edx\n\tjl\t.L6\n.L3:\n\ttestb\t%r8b, %r8b\n\tjns\t.L1\n\tmovl\t%r8d, %eax\n\tandl\t$-32, %eax\n\tcmpb\t$-64, %al\n\tje\t.L37\n\tmovl\t%r8d, %eax\n\tandl\t$-16, %eax\n\tcmpb\t$-32, %al\n\tjne\t.L40\n.L37:\n\tmovl\t$63, %r8d\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L39:\n\tandl\t$-64, %r8d\n\tcmpb\t$-128, %r8b\n\tjne\t.L16\n\tleal\t2(%rdx), %eax\n\tcltq\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tmovzbl\t(%rdi,%rax), %r8d\n\tmovl\t%eax, %edx\n\tmovq\t%rax, %rcx\n\taddq\t$1, %rax\n\tmovl\t%r8d, %r9d\n\tandl\t$-64, %r9d\n\tcmpb\t$-128, %r9b\n\tje\t.L5\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L40:\n\tmovl\t%r8d, %eax\n\tandl\t$-8, %eax\n\tcmpb\t$-16, %al\n\tjne\t.L37\n\tmovzbl\t1(%rdi,%rcx), %eax\n\tandl\t$7, %r8d\n\ttestb\t%al, %al\n\tje\t.L8\n\tsalq\t$3, %r8\n\tandl\t$63, %eax\n\torq\t%rax, %r8\n.L8:\n\tmovzbl\t2(%rdi,%rcx), %eax\n\ttestb\t%al, %al\n\tje\t.L9\n\tandl\t$63, %eax\n\tsalq\t$6, %r8\n\torq\t%rax, %r8\n\tmovzbl\t3(%rdi,%rcx), %eax\n\ttestb\t%al, %al\n\tjne\t.L12\n.L10:\n\tleaq\t-57344(%r8), %rax\n\tcmpq\t$15, %rax\n\tja\t.L37\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovzbl\t-57344(%rax,%r8), %r8d\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L13:\n\txorl\t%r8d, %r8d\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L16:\n\tmovl\t%r9d, %r8d\n\tjmp\t.L36\n.L9:\n\tmovzbl\t3(%rdi,%rcx), %eax\n\ttestb\t%al, %al\n\tje\t.L37\n.L12:\n\tsalq\t$6, %r8\n\tandl\t$63, %eax\n\torq\t%rax, %r8\n\tjmp\t.L10\n.L14:\n\txorl\t%ecx, %ecx\n\tjmp\t.L3\n\t.cfi_endproc\n\n", ".global lcd_hwchr\n.type lcd_hwchr, %function\nlcd_hwchr:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\tw1, [sp, 4]\n\tstr\txzr, [sp, 24]\n\tldr\tx0, [sp, 8]\n\tcmp\tx0, 0\n\tbne\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tstr\twzr, [sp, 20]\n\tb\t.L4\n.L9:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tsxtb\tw0, w0\n\tcmp\tw0, 0\n\tblt\t.L5\n\tldr\tw0, [sp, 20]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 20]\n\tb\t.L4\n.L5:\n\tldr\tw0, [sp, 20]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 20]\n\tb\t.L6\n.L7:\n\tldr\tw0, [sp, 20]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 20]\n.L6:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tw0, w0, 192\n\tcmp\tw0, 128\n\tbeq\t.L7\n.L4:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L8\n\tldr\tw1, [sp, 20]\n\tldr\tw0, [sp, 4]\n\tcmp\tw1, w0\n\tblt\t.L9\n.L8:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tsxtb\tw0, w0\n\tcmp\tw0, 0\n\tblt\t.L10\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tb\t.L3\n.L10:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tw0, w0, 224\n\tcmp\tw0, 192\n\tbne\t.L11\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 31\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L11\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 5\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L11:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tw0, w0, 240\n\tcmp\tw0, 224\n\tbne\t.L12\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 15\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L13\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 4\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L13:\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L12\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 6\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L12:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tw0, w0, 248\n\tcmp\tw0, 240\n\tbne\t.L14\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 7\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L15\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 3\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L15:\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L16\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 6\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L16:\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 3\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L14\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 6\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 3\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L14:\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57359\n\tcmp\tx1, x0\n\tbeq\t.L17\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57359\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57358\n\tcmp\tx1, x0\n\tbeq\t.L19\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57358\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57357\n\tcmp\tx1, x0\n\tbeq\t.L20\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57357\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57356\n\tcmp\tx1, x0\n\tbeq\t.L21\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57356\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57355\n\tcmp\tx1, x0\n\tbeq\t.L22\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57355\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57354\n\tcmp\tx1, x0\n\tbeq\t.L23\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57354\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57353\n\tcmp\tx1, x0\n\tbeq\t.L24\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57353\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57352\n\tcmp\tx1, x0\n\tbeq\t.L25\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57352\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57351\n\tcmp\tx1, x0\n\tbeq\t.L26\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57351\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57350\n\tcmp\tx1, x0\n\tbeq\t.L27\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57350\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57349\n\tcmp\tx1, x0\n\tbeq\t.L28\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57349\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57348\n\tcmp\tx1, x0\n\tbeq\t.L29\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57348\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57347\n\tcmp\tx1, x0\n\tbeq\t.L30\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57347\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57346\n\tcmp\tx1, x0\n\tbeq\t.L31\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57346\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx0, [sp, 24]\n\tcmp\tx0, 57344\n\tbeq\t.L32\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57345\n\tcmp\tx1, x0\n\tbeq\t.L33\n\tb\t.L18\n.L32:\n\tmov\tw0, 69\n\tb\t.L3\n.L33:\n\tmov\tw0, 78\n\tb\t.L3\n.L31:\n\tmov\tw0, 68\n\tb\t.L3\n.L30:\n\tmov\tw0, 69\n\tb\t.L3\n.L29:\n\tmov\tw0, 78\n\tb\t.L3\n.L28:\n\tmov\tw0, 68\n\tb\t.L3\n.L27:\n\tmov\tw0, 86\n\tb\t.L3\n.L26:\n\tmov\tw0, 118\n\tb\t.L3\n.L25:\n\tmov\tw0, 60\n\tb\t.L3\n.L24:\n\tmov\tw0, 62\n\tb\t.L3\n.L23:\n\tmov\tw0, 112\n\tb\t.L3\n.L22:\n\tmov\tw0, 98\n\tb\t.L3\n.L21:\n\tmov\tw0, 102\n\tb\t.L3\n.L20:\n\tmov\tw0, 114\n\tb\t.L3\n.L19:\n\tmov\tw0, 115\n\tb\t.L3\n.L17:\n\tmov\tw0, 120\n\tb\t.L3\n.L18:\n\tmov\tw0, 63\n.L3:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global lcd_hwchr\n.type lcd_hwchr, %function\nlcd_hwchr:\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\txzr, [sp, 24]\n\tldr\tx0, [sp, 8]\n\tcmp\tx0, 0\n\tbne\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tstr\twzr, [sp, 20]\n\tb\t.L4\n.L9:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tsxtb\tw0, w0\n\tcmp\tw0, 0\n\tblt\t.L5\n\tldr\tw0, [sp, 20]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 20]\n\tb\t.L4\n.L5:\n\tldr\tw0, [sp, 20]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 20]\n\tb\t.L6\n.L7:\n\tldr\tw0, [sp, 20]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 20]\n.L6:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tw0, w0, 192\n\tcmp\tw0, 128\n\tbeq\t.L7\n.L4:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L8\n\tldr\tw1, [sp, 20]\n\tldr\tw0, [sp, 4]\n\tcmp\tw1, w0\n\tblt\t.L9\n.L8:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tsxtb\tw0, w0\n\tcmp\tw0, 0\n\tblt\t.L10\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tb\t.L3\n.L10:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tw0, w0, 224\n\tcmp\tw0, 192\n\tbne\t.L11\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 31\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L11\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 5\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L11:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tw0, w0, 240\n\tcmp\tw0, 224\n\tbne\t.L12\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 15\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L13\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 4\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L13:\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L12\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 6\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L12:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tw0, w0, 248\n\tcmp\tw0, 240\n\tbne\t.L14\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 7\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L15\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 3\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L15:\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L16\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 6\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L16:\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 3\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L14\n\tldr\tx0, [sp, 24]\n\tlsl\tx0, x0, 6\n\tstr\tx0, [sp, 24]\n\tldrsw\tx0, [sp, 20]\n\tadd\tx0, x0, 3\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tand\tx0, x0, 255\n\tand\tx0, x0, 63\n\tldr\tx1, [sp, 24]\n\torr\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n.L14:\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57359\n\tcmp\tx1, x0\n\tbeq\t.L17\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57359\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57358\n\tcmp\tx1, x0\n\tbeq\t.L19\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57358\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57357\n\tcmp\tx1, x0\n\tbeq\t.L20\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57357\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57356\n\tcmp\tx1, x0\n\tbeq\t.L21\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57356\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57355\n\tcmp\tx1, x0\n\tbeq\t.L22\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57355\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57354\n\tcmp\tx1, x0\n\tbeq\t.L23\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57354\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57353\n\tcmp\tx1, x0\n\tbeq\t.L24\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57353\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57352\n\tcmp\tx1, x0\n\tbeq\t.L25\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57352\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57351\n\tcmp\tx1, x0\n\tbeq\t.L26\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57351\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57350\n\tcmp\tx1, x0\n\tbeq\t.L27\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57350\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57349\n\tcmp\tx1, x0\n\tbeq\t.L28\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57349\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57348\n\tcmp\tx1, x0\n\tbeq\t.L29\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57348\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57347\n\tcmp\tx1, x0\n\tbeq\t.L30\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57347\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57346\n\tcmp\tx1, x0\n\tbeq\t.L31\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57346\n\tcmp\tx1, x0\n\tbhi\t.L18\n\tldr\tx0, [sp, 24]\n\tcmp\tx0, 57344\n\tbeq\t.L32\n\tldr\tx1, [sp, 24]\n\tmov\tx0, 57345\n\tcmp\tx1, x0\n\tbeq\t.L33\n\tb\t.L18\n.L32:\n\tmov\tw0, 69\n\tb\t.L3\n.L33:\n\tmov\tw0, 78\n\tb\t.L3\n.L31:\n\tmov\tw0, 68\n\tb\t.L3\n.L30:\n\tmov\tw0, 69\n\tb\t.L3\n.L29:\n\tmov\tw0, 78\n\tb\t.L3\n.L28:\n\tmov\tw0, 68\n\tb\t.L3\n.L27:\n\tmov\tw0, 86\n\tb\t.L3\n.L26:\n\tmov\tw0, 118\n\tb\t.L3\n.L25:\n\tmov\tw0, 60\n\tb\t.L3\n.L24:\n\tmov\tw0, 62\n\tb\t.L3\n.L23:\n\tmov\tw0, 112\n\tb\t.L3\n.L22:\n\tmov\tw0, 98\n\tb\t.L3\n.L21:\n\tmov\tw0, 102\n\tb\t.L3\n.L20:\n\tmov\tw0, 114\n\tb\t.L3\n.L19:\n\tmov\tw0, 115\n\tb\t.L3\n.L17:\n\tmov\tw0, 120\n\tb\t.L3\n.L18:\n\tmov\tw0, 63\n.L3:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global lcd_hwchr\n.type lcd_hwchr, %function\nlcd_hwchr:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx3, x0\n\tcbz\tx0, .L13\n\tmov\tw2, 0\n.L3:\n\tldrb\tw0, [x3, w2, sxtw]\n\tsxtw\tx4, w2\n\tcbz\tw0, .L2\n\tsxtb\tw5, w0\n\tcmp\tw2, w1\n\tblt\t.L6\n\ttbz\tw5, #31, .L2\n\tand\tw1, w0, 224\n\tcmp\tw1, 192\n\tbne\t.L14\n\tadd\tx2, x3, x4\n\tand\tx1, x0, 31\n\tldrb\tw2, [x2, 1]\n\tcbz\tw2, .L7\n\tand\tx2, x2, 63\n\torr\tx1, x2, x1, lsl 5\n.L7:\n\tand\tw2, w0, 240\n\tcmp\tw2, 224\n\tbne\t.L8\n\tadd\tx5, x3, x4\n\tand\tx2, x0, 15\n\torr\tx1, x1, x2\n\tldrb\tw2, [x5, 1]\n\tcbz\tw2, .L9\n\tand\tx2, x2, 63\n\torr\tx1, x2, x1, lsl 4\n.L9:\n\tldrb\tw2, [x5, 2]\n\tcbz\tw2, .L8\n\tand\tx2, x2, 63\n\torr\tx1, x2, x1, lsl 6\n.L8:\n\tand\tw2, w0, 248\n\tcmp\tw2, 240\n\tbne\t.L10\n\tadd\tx3, x3, x4\n\tand\tx2, x0, 7\n\torr\tx1, x1, x2\n\tldrb\tw0, [x3, 1]\n\tcbz\tw0, .L11\n\tand\tx0, x0, 63\n\torr\tx1, x0, x1, lsl 3\n.L11:\n\tldrb\tw0, [x3, 2]\n\tcbz\tw0, .L12\n\tand\tx0, x0, 63\n\torr\tx1, x0, x1, lsl 6\n.L12:\n\tldrb\tw0, [x3, 3]\n\tcbz\tw0, .L10\n\tand\tx0, x0, 63\n\torr\tx1, x0, x1, lsl 6\n.L10:\n\tsub\tx1, x1, #57344\n\tcmp\tx1, 15\n\tbhi\t.L15\n\tadrp\tx0, .LANCHOR0\n\tadd\tx0, x0, :lo12:.LANCHOR0\n\tldrb\tw0, [x0, x1]\n.L2:\n\tret\n.L6:\n\tadd\tw2, w2, 1\n\ttbz\tw5, #31, .L3\n\tsxtw\tx0, w2\n.L5:\n\tldrb\tw4, [x3, x0]\n\tmov\tw2, w0\n\tadd\tx0, x0, 1\n\tand\tw4, w4, 192\n\tcmp\tw4, 128\n\tbeq\t.L5\n\tb\t.L3\n.L14:\n\tmov\tx1, 0\n\tb\t.L7\n.L13:\n\tmov\tw0, 0\n\tb\t.L2\n.L15:\n\tmov\tw0, 63\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global lcd_hwchr\n.type lcd_hwchr, %function\nlcd_hwchr:\n.LFB48:\n\t.cfi_startproc\n\tmov\tx3, x0\n\tcbz\tx0, .L13\n\tmov\tw2, 0\n.L3:\n\tldrb\tw0, [x3, w2, sxtw]\n\tsxtw\tx4, w2\n\tcbz\tw0, .L2\n\tsxtb\tw5, w0\n\tcmp\tw2, w1\n\tblt\t.L6\n\ttbz\tw5, #31, .L2\n\tand\tw1, w0, 224\n\tcmp\tw1, 192\n\tbne\t.L14\n\tadd\tx2, x3, x4\n\tand\tx1, x0, 31\n\tldrb\tw2, [x2, 1]\n\tcbz\tw2, .L7\n\tand\tx2, x2, 63\n\torr\tx1, x2, x1, lsl 5\n.L7:\n\tand\tw2, w0, 240\n\tcmp\tw2, 224\n\tbne\t.L8\n\tadd\tx5, x3, x4\n\tand\tx2, x0, 15\n\torr\tx1, x1, x2\n\tldrb\tw2, [x5, 1]\n\tcbz\tw2, .L9\n\tand\tx2, x2, 63\n\torr\tx1, x2, x1, lsl 4\n.L9:\n\tldrb\tw2, [x5, 2]\n\tcbz\tw2, .L8\n\tand\tx2, x2, 63\n\torr\tx1, x2, x1, lsl 6\n.L8:\n\tand\tw2, w0, 248\n\tcmp\tw2, 240\n\tbne\t.L10\n\tadd\tx3, x3, x4\n\tand\tx2, x0, 7\n\torr\tx1, x1, x2\n\tldrb\tw0, [x3, 1]\n\tcbz\tw0, .L11\n\tand\tx0, x0, 63\n\torr\tx1, x0, x1, lsl 3\n.L11:\n\tldrb\tw0, [x3, 2]\n\tcbz\tw0, .L12\n\tand\tx0, x0, 63\n\torr\tx1, x0, x1, lsl 6\n.L12:\n\tldrb\tw0, [x3, 3]\n\tcbz\tw0, .L10\n\tand\tx0, x0, 63\n\torr\tx1, x0, x1, lsl 6\n.L10:\n\tsub\tx1, x1, #57344\n\tcmp\tx1, 15\n\tbhi\t.L15\n\tadrp\tx0, .LANCHOR0\n\tadd\tx0, x0, :lo12:.LANCHOR0\n\tldrb\tw0, [x0, x1]\n.L2:\n\tret\n.L6:\n\tadd\tw2, w2, 1\n\ttbz\tw5, #31, .L3\n\tsxtw\tx0, w2\n.L5:\n\tldrb\tw4, [x3, x0]\n\tmov\tw2, w0\n\tadd\tx0, x0, 1\n\tand\tw4, w4, 192\n\tcmp\tw4, 128\n\tbeq\t.L5\n\tb\t.L3\n.L14:\n\tmov\tx1, 0\n\tb\t.L7\n.L13:\n\tmov\tw0, 0\n\tb\t.L2\n.L15:\n\tmov\tw0, 63\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global lcd_hwchr\n.type lcd_hwchr, %function\nlcd_hwchr:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx4, x0\n\tcbz\tx0, .L13\n\tldrb\tw0, [x0]\n\tcbz\tw0, .L25\n\tcmp\tw1, 0\n\tble\t.L14\n\tmov\tw3, 0\n\t.p2align 3,,7\n.L6:\n\tadd\tw2, w3, 1\n\tsxtb\tw5, w0\n\tsxtw\tx6, w2\n\tldrb\tw0, [x4, w2, sxtw]\n\ttbnz\tw5, #31, .L38\n.L16:\n\tmov\tw3, w2\n.L4:\n\tcbz\tw0, .L25\n\tcmp\tw3, w1\n\tblt\t.L6\n.L3:\n\ttbz\tx0, 7, .L25\n\tand\tw1, w0, 224\n\tcmp\tw1, 192\n\tbeq\t.L36\n\tand\tw1, w0, 240\n\tcmp\tw1, 224\n\tbne\t.L39\n.L36:\n\tmov\tw0, 63\n.L25:\n\tret\n\t.p2align 2,,3\n.L38:\n\tand\tw5, w0, 192\n\tcmp\tw5, 128\n\tbne\t.L16\n\tadd\tw2, w3, 2\n\tsxtw\tx2, w2\n\t.p2align 3,,7\n.L5:\n\tldrb\tw0, [x4, x2]\n\tmov\tw3, w2\n\tmov\tx6, x2\n\tadd\tx2, x2, 1\n\tand\tw5, w0, 192\n\tcmp\tw5, 128\n\tbeq\t.L5\n\tb\t.L4\n\t.p2align 2,,3\n.L39:\n\tand\tw1, w0, 248\n\tcmp\tw1, 240\n\tbne\t.L36\n\tadd\tx4, x4, x6\n\tubfiz\tx5, x0, 3, 3\n\tand\tx0, x0, 7\n\tldrb\tw2, [x4, 1]\n\tldrb\tw3, [x4, 2]\n\tand\tx1, x2, 63\n\tcmp\tw2, 0\n\torr\tx1, x1, x5\n\tcsel\tx0, x0, x1, eq\n\tldrb\tw1, [x4, 3]\n\tcbz\tw3, .L9\n\tmov\tx2, x3\n\tbfi\tx2, x0, 6, 58\n\tmov\tx0, x2\n\tcbnz\tw1, .L12\n.L10:\n\tsub\tx0, x0, #57344\n\tcmp\tx0, 15\n\tbhi\t.L36\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrb\tw0, [x1, x0]\n\tret\n\t.p2align 2,,3\n.L13:\n\tmov\tw0, 0\n\tret\n.L9:\n\tcbz\tw1, .L36\n.L12:\n\tbfi\tx1, x0, 6, 58\n\tmov\tx0, x1\n\tb\t.L10\n.L14:\n\tmov\tx6, 0\n\tb\t.L3\n\t.cfi_endproc\n\n", ".global lcd_hwchr\n.type lcd_hwchr, %function\nlcd_hwchr:\n.LFB63:\n\t.cfi_startproc\n\tmov\tx4, x0\n\tcbz\tx0, .L13\n\tldrb\tw0, [x0]\n\tcbz\tw0, .L25\n\tcmp\tw1, 0\n\tble\t.L14\n\tmov\tw3, 0\n\t.p2align 3,,7\n.L6:\n\tadd\tw2, w3, 1\n\tsxtb\tw5, w0\n\tsxtw\tx6, w2\n\tldrb\tw0, [x4, w2, sxtw]\n\ttbnz\tw5, #31, .L38\n.L16:\n\tmov\tw3, w2\n.L4:\n\tcbz\tw0, .L25\n\tcmp\tw3, w1\n\tblt\t.L6\n.L3:\n\ttbz\tx0, 7, .L25\n\tand\tw1, w0, 224\n\tcmp\tw1, 192\n\tbeq\t.L36\n\tand\tw1, w0, 240\n\tcmp\tw1, 224\n\tbne\t.L39\n.L36:\n\tmov\tw0, 63\n.L25:\n\tret\n\t.p2align 2,,3\n.L38:\n\tand\tw5, w0, 192\n\tcmp\tw5, 128\n\tbne\t.L16\n\tadd\tw2, w3, 2\n\tsxtw\tx2, w2\n\t.p2align 3,,7\n.L5:\n\tldrb\tw0, [x4, x2]\n\tmov\tw3, w2\n\tmov\tx6, x2\n\tadd\tx2, x2, 1\n\tand\tw5, w0, 192\n\tcmp\tw5, 128\n\tbeq\t.L5\n\tb\t.L4\n\t.p2align 2,,3\n.L39:\n\tand\tw1, w0, 248\n\tcmp\tw1, 240\n\tbne\t.L36\n\tadd\tx4, x4, x6\n\tubfiz\tx5, x0, 3, 3\n\tand\tx0, x0, 7\n\tldrb\tw2, [x4, 1]\n\tldrb\tw3, [x4, 2]\n\tand\tx1, x2, 63\n\tcmp\tw2, 0\n\torr\tx1, x1, x5\n\tcsel\tx0, x0, x1, eq\n\tldrb\tw1, [x4, 3]\n\tcbz\tw3, .L9\n\tmov\tx2, x3\n\tbfi\tx2, x0, 6, 58\n\tmov\tx0, x2\n\tcbnz\tw1, .L12\n.L10:\n\tsub\tx0, x0, #57344\n\tcmp\tx0, 15\n\tbhi\t.L36\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrb\tw0, [x1, x0]\n\tret\n\t.p2align 2,,3\n.L13:\n\tmov\tw0, 0\n\tret\n.L9:\n\tcbz\tw1, .L36\n.L12:\n\tbfi\tx1, x0, 6, 58\n\tmov\tx0, x1\n\tb\t.L10\n.L14:\n\tmov\tx6, 0\n\tb\t.L3\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 <errno.h> #include <sys/ioctl.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <time.h> #include <string.h> #include <stdio.h> #include <ncurses.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": [ "\"zssxuolrfgidgvhxvgbkqou\"", "111" ], "var": [ "str", "pos" ] }, { "value": [ "\"zpbm\"", "94" ], "var": [ "str", "pos" ] }, { "value": [ "\"juva\"", "45" ], "var": [ "str", "pos" ] }, { "value": [ "\"nrshtbddfxglvbocymuvnuifbgv\"", "102" ], "var": [ "str", "pos" ] }, { "value": [ "\"eaqtzgjopfmcfrri\"", "18" ], "var": [ "str", "pos" ] }, { "value": [ "\"hxsmiecmrvtopjtfassmpcifdrg\"", "82" ], "var": [ "str", "pos" ] }, { "value": [ "\"xgrazlpbjtxcdztlmuwhr\"", "124" ], "var": [ "str", "pos" ] }, { "value": [ "\"frgpyfrbkfsmbnvyermboygsvdt\"", "45" ], "var": [ "str", "pos" ] }, { "value": [ "\"kxjadwhyadtesybowsy\"", "3" ], "var": [ "str", "pos" ] }, { "value": [ "\"auvxkmxomyypwsgjdqrumovsxefyhm\"", "21" ], "var": [ "str", "pos" ] }, { "value": [ "\"zssxuolrfgidgvhxvgbkqou\"", "111" ], "var": [ "str", "pos" ] }, { "value": [ "\"zpbm\"", "94" ], "var": [ "str", "pos" ] }, { "value": [ "\"juva\"", "45" ], "var": [ "str", "pos" ] }, { "value": [ "\"nrshtbddfxglvbocymuvnuifbgv\"", "102" ], "var": [ "str", "pos" ] }, { "value": [ "\"eaqtzgjopfmcfrri\"", "18" ], "var": [ "str", "pos" ] }, { "value": [ "\"hxsmiecmrvtopjtfassmpcifdrg\"", "82" ], "var": [ "str", "pos" ] }, { "value": [ "\"xgrazlpbjtxcdztlmuwhr\"", "124" ], "var": [ "str", "pos" ] }, { "value": [ "\"frgpyfrbkfsmbnvyermboygsvdt\"", "45" ], "var": [ "str", "pos" ] }, { "value": [ "\"kxjadwhyadtesybowsy\"", "3" ], "var": [ "str", "pos" ] }, { "value": [ "\"auvxkmxomyypwsgjdqrumovsxefyhm\"", "21" ], "var": [ "str", "pos" ] }, { "value": [ "\"zssxuolrfgidgvhxvgbkqou\"", "111" ], "var": [ "str", "pos" ] }, { "value": [ "\"zpbm\"", "94" ], "var": [ "str", "pos" ] }, { "value": [ "\"juva\"", "45" ], "var": [ "str", "pos" ] }, { "value": [ "\"nrshtbddfxglvbocymuvnuifbgv\"", "102" ], "var": [ "str", "pos" ] }, { "value": [ "\"eaqtzgjopfmcfrri\"", "18" ], "var": [ "str", "pos" ] }, { "value": [ "\"hxsmiecmrvtopjtfassmpcifdrg\"", "82" ], "var": [ "str", "pos" ] }, { "value": [ "\"xgrazlpbjtxcdztlmuwhr\"", "124" ], "var": [ "str", "pos" ] }, { "value": [ "\"frgpyfrbkfsmbnvyermboygsvdt\"", "45" ], "var": [ "str", "pos" ] }, { "value": [ "\"kxjadwhyadtesybowsy\"", "3" ], "var": [ "str", "pos" ] }, { "value": [ "\"auvxkmxomyypwsgjdqrumovsxefyhm\"", "21" ], "var": [ "str", "pos" ] } ], "output": [ { "value": [ "0", "\"zssxuolrfgidgvhxvgbkqou\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"zpbm\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"juva\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"nrshtbddfxglvbocymuvnuifbgv\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"eaqtzgjopfmcfrri\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"hxsmiecmrvtopjtfassmpcifdrg\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"xgrazlpbjtxcdztlmuwhr\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"frgpyfrbkfsmbnvyermboygsvdt\"" ], "var": [ "returnv", "str" ] }, { "value": [ "97", "\"kxjadwhyadtesybowsy\"" ], "var": [ "returnv", "str" ] }, { "value": [ "111", "\"auvxkmxomyypwsgjdqrumovsxefyhm\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"zssxuolrfgidgvhxvgbkqou\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"zpbm\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"juva\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"nrshtbddfxglvbocymuvnuifbgv\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"eaqtzgjopfmcfrri\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"hxsmiecmrvtopjtfassmpcifdrg\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"xgrazlpbjtxcdztlmuwhr\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"frgpyfrbkfsmbnvyermboygsvdt\"" ], "var": [ "returnv", "str" ] }, { "value": [ "97", "\"kxjadwhyadtesybowsy\"" ], "var": [ "returnv", "str" ] }, { "value": [ "111", "\"auvxkmxomyypwsgjdqrumovsxefyhm\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"zssxuolrfgidgvhxvgbkqou\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"zpbm\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"juva\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"nrshtbddfxglvbocymuvnuifbgv\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"eaqtzgjopfmcfrri\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"hxsmiecmrvtopjtfassmpcifdrg\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"xgrazlpbjtxcdztlmuwhr\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"frgpyfrbkfsmbnvyermboygsvdt\"" ], "var": [ "returnv", "str" ] }, { "value": [ "97", "\"kxjadwhyadtesybowsy\"" ], "var": [ "returnv", "str" ] }, { "value": [ "111", "\"auvxkmxomyypwsgjdqrumovsxefyhm\"" ], "var": [ "returnv", "str" ] } ] }
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"zssxuolrfgidgvhxvgbkqou\"", "111" ], "var": [ "str", "pos" ] }, { "value": [ "\"zpbm\"", "94" ], "var": [ "str", "pos" ] }, { "value": [ "\"juva\"", "45" ], "var": [ "str", "pos" ] }, { "value": [ "\"nrshtbddfxglvbocymuvnuifbgv\"", "102" ], "var": [ "str", "pos" ] }, { "value": [ "\"eaqtzgjopfmcfrri\"", "18" ], "var": [ "str", "pos" ] }, { "value": [ "\"hxsmiecmrvtopjtfassmpcifdrg\"", "82" ], "var": [ "str", "pos" ] }, { "value": [ "\"xgrazlpbjtxcdztlmuwhr\"", "124" ], "var": [ "str", "pos" ] }, { "value": [ "\"frgpyfrbkfsmbnvyermboygsvdt\"", "45" ], "var": [ "str", "pos" ] }, { "value": [ "\"kxjadwhyadtesybowsy\"", "3" ], "var": [ "str", "pos" ] }, { "value": [ "\"auvxkmxomyypwsgjdqrumovsxefyhm\"", "21" ], "var": [ "str", "pos" ] } ], "output": [ { "value": [ "0", "\"zssxuolrfgidgvhxvgbkqou\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"zpbm\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"juva\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"nrshtbddfxglvbocymuvnuifbgv\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"eaqtzgjopfmcfrri\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"hxsmiecmrvtopjtfassmpcifdrg\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"xgrazlpbjtxcdztlmuwhr\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"frgpyfrbkfsmbnvyermboygsvdt\"" ], "var": [ "returnv", "str" ] }, { "value": [ "97", "\"kxjadwhyadtesybowsy\"" ], "var": [ "returnv", "str" ] }, { "value": [ "111", "\"auvxkmxomyypwsgjdqrumovsxefyhm\"" ], "var": [ "returnv", "str" ] } ] }
extern "C" { #include "/run/user/1000/pytmpfile_jordiws_3577740ez0441_7.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* str, int pos, char returnv) { json output_json; output_json["str"] = str; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* str = strdup(input_json["str"].get<std::string>().c_str()); int pos = input_json["pos"]; clock_t begin = clock(); char returnv = lcd_hwchr(str, pos); clock_t end = 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, pos, returnv); }
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_58q4jhtmf8.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 pos, char returnv) { json output_json; output_json["str"] = str; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* str = strdup(input_json["str"].get<std::string>().c_str()); int pos = input_json["pos"]; clock_t begin = clock(); char returnv = lcd_hwchr(str, pos); clock_t end = 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, pos, returnv); }
master
null
{"livein": ["str", "pos"], "liveout": ["str"], "returnvarname": ["returnv"], "execcmd": "", "funname": "lcd_hwchr", "funargs": ["str", "pos"], "typemap": {"str": "string", "pos": "int32", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_58q4jhtmf8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
GTempler/MLVMystic/modules/lv_rec/lv_rec.c
unsigned int lv_rec_deinit() { return 0; }
unsigned int lv_rec_deinit()
unsigned int lv_rec_deinit()
lv_rec_deinit
[ "unsigned int", "" ]
{ "code": [ ".globl lv_rec_deinit\n.type lv_rec_deinit, @function\nlv_rec_deinit:\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 lv_rec_deinit\n.type lv_rec_deinit, @function\nlv_rec_deinit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl lv_rec_deinit\n.type lv_rec_deinit, @function\nlv_rec_deinit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global lv_rec_deinit\n.type lv_rec_deinit, %function\nlv_rec_deinit:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global lv_rec_deinit\n.type lv_rec_deinit, %function\nlv_rec_deinit:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global lv_rec_deinit\n.type lv_rec_deinit, %function\nlv_rec_deinit:\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_58y1nq5gby.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); unsigned int returnv = lv_rec_deinit(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "lv_rec_deinit", "funargs": [], "typemap": {"returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_58y1nq5gby.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
quchunguang/test/testsams/sams_server/senseCrypt/hello.c
int hello_add(int a, int b) { return a + b; }
int hello_add(inta, intb)
int hello_add(int a, int b)
hello_add
[ "int", "int", "int" ]
{ "code": [ ".globl hello_add\n.type hello_add, @function\nhello_add:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %edx\n\tmovl\t-8(%rbp), %eax\n\taddl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl hello_add\n.type hello_add, @function\nhello_add:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl hello_add\n.type hello_add, @function\nhello_add:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global hello_add\n.type hello_add, %function\nhello_add:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global hello_add\n.type hello_add, %function\nhello_add:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global hello_add\n.type hello_add, %function\nhello_add:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "33", "30" ], "var": [ "a", "b" ] }, { "value": [ "115", "65" ], "var": [ "a", "b" ] }, { "value": [ "22", "122" ], "var": [ "a", "b" ] }, { "value": [ "124", "89" ], "var": [ "a", "b" ] }, { "value": [ "107", "61" ], "var": [ "a", "b" ] }, { "value": [ "96", "0" ], "var": [ "a", "b" ] }, { "value": [ "66", "37" ], "var": [ "a", "b" ] }, { "value": [ "29", "75" ], "var": [ "a", "b" ] }, { "value": [ "40", "105" ], "var": [ "a", "b" ] }, { "value": [ "118", "3" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "180" ], "var": [ "returnv" ] }, { "value": [ "144" ], "var": [ "returnv" ] }, { "value": [ "213" ], "var": [ "returnv" ] }, { "value": [ "168" ], "var": [ "returnv" ] }, { "value": [ "96" ], "var": [ "returnv" ] }, { "value": [ "103" ], "var": [ "returnv" ] }, { "value": [ "104" ], "var": [ "returnv" ] }, { "value": [ "145" ], "var": [ "returnv" ] }, { "value": [ "121" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_33z9fwclt0.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = hello_add(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "hello_add", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33z9fwclt0.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
pmq20/ruby-compiler/ruby/ext/socket/constdefs.c
int rsock_ip_level_to_int(const char *str, long len, int *valp) { switch (len) { case 2: # 5182 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pmq20/ruby-compiler/refs/heads/master/ruby/ext/socket/constdefs.c" return -1; case 3: # 5221 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pmq20/ruby-compiler/refs/heads/master/ruby/ext/socket/constdefs.c" return -1; case 4: # 5236 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pmq20/ruby-compiler/refs/heads/master/ruby/ext/socket/constdefs.c" return -1; case 5: return -1; case 6: return -1; case 7: # 5263 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pmq20/ruby-compiler/refs/heads/master/ruby/ext/socket/constdefs.c" return -1; case 8: return -1; case 10: # 5287 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pmq20/ruby-compiler/refs/heads/master/ruby/ext/socket/constdefs.c" return -1; case 11: # 5326 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pmq20/ruby-compiler/refs/heads/master/ruby/ext/socket/constdefs.c" return -1; case 12: # 5341 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pmq20/ruby-compiler/refs/heads/master/ruby/ext/socket/constdefs.c" return -1; case 13: return -1; case 14: return -1; case 15: # 5365 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pmq20/ruby-compiler/refs/heads/master/ruby/ext/socket/constdefs.c" return -1; case 16: return -1; default: if (!str || !valp) { } return -1; } }
int rsock_ip_level_to_int(const char *str, longlen, int *valp)
int rsock_ip_level_to_int(const char *str, long len, int *valp)
rsock_ip_level_to_int
[ "int", "const char *", "long", "int *" ]
{ "code": [ ".globl rsock_ip_level_to_int\n.type rsock_ip_level_to_int, @function\nrsock_ip_level_to_int:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t%rsi, -16(%rbp)\n\tmovq\t%rdx, -24(%rbp)\n\tcmpq\t$16, -16(%rbp)\n\tja\t.L19\n\tmovq\t-16(%rbp), %rax\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\t.L4(%rip), %rax\n\tmovl\t(%rdx,%rax), %eax\n\tcltq\n\tleaq\t.L4(%rip), %rdx\n\taddq\t%rdx, %rax\n\tnotrack jmp\t*%rax\n\t.section\t.rodata\n\t.align 4\n\t.align 4\n.L4:\n\t.long\t.L19-.L4\n\t.long\t.L19-.L4\n\t.long\t.L17-.L4\n\t.long\t.L16-.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.L19-.L4\n\t.long\t.L10-.L4\n\t.long\t.L9-.L4\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.text\n.L17:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L16:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L15:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L14:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L13:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L12:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L11:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L10:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L9:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L8:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L7:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L6:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L5:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L3:\n\tmovl\t$-1, %eax\n\tjmp\t.L18\n.L19:\n\tmovl\t$-1, %eax\n.L18:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl rsock_ip_level_to_int\n.type rsock_ip_level_to_int, @function\nrsock_ip_level_to_int:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\torl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl rsock_ip_level_to_int\n.type rsock_ip_level_to_int, @function\nrsock_ip_level_to_int:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global rsock_ip_level_to_int\n.type rsock_ip_level_to_int, %function\nrsock_ip_level_to_int:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 24]\n\tstr\tx1, [sp, 16]\n\tstr\tx2, [sp, 8]\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 16\n\tbeq\t.L2\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 16\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 15\n\tbeq\t.L4\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 15\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 14\n\tbeq\t.L5\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 14\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 13\n\tbeq\t.L6\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 13\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 12\n\tbeq\t.L7\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 12\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 11\n\tbeq\t.L8\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 11\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 10\n\tbeq\t.L9\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 10\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 8\n\tbeq\t.L10\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 8\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 7\n\tbeq\t.L11\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 7\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 6\n\tbeq\t.L12\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 6\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 5\n\tbeq\t.L13\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 5\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 4\n\tbeq\t.L14\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 4\n\tbgt\t.L18\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 2\n\tbeq\t.L15\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 3\n\tbeq\t.L16\n\tb\t.L18\n.L15:\n\tmov\tw0, -1\n\tb\t.L17\n.L16:\n\tmov\tw0, -1\n\tb\t.L17\n.L14:\n\tmov\tw0, -1\n\tb\t.L17\n.L13:\n\tmov\tw0, -1\n\tb\t.L17\n.L12:\n\tmov\tw0, -1\n\tb\t.L17\n.L11:\n\tmov\tw0, -1\n\tb\t.L17\n.L10:\n\tmov\tw0, -1\n\tb\t.L17\n.L9:\n\tmov\tw0, -1\n\tb\t.L17\n.L8:\n\tmov\tw0, -1\n\tb\t.L17\n.L7:\n\tmov\tw0, -1\n\tb\t.L17\n.L6:\n\tmov\tw0, -1\n\tb\t.L17\n.L5:\n\tmov\tw0, -1\n\tb\t.L17\n.L4:\n\tmov\tw0, -1\n\tb\t.L17\n.L2:\n\tmov\tw0, -1\n\tb\t.L17\n.L18:\n\tmov\tw0, -1\n.L17:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global rsock_ip_level_to_int\n.type rsock_ip_level_to_int, %function\nrsock_ip_level_to_int:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n", ".global rsock_ip_level_to_int\n.type rsock_ip_level_to_int, %function\nrsock_ip_level_to_int:\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": [ "\"tsmlrfgmuuums\"", "62", "[24, 102, 97, 17, 84, 90, 28, 29, 48, 70, 29, 113, 70, 121, 99, 74, 55, 95, 10, 55, 45, 100, 43, 36, 82, 88, 0, 26, 26, 6, 125, 50]" ], "var": [ "str", "len", "valp" ] }, { "value": [ "\"grmxnnmucxoaefaq\"", "40", "[111, 38, 32, 119, 21, 91, 55, 67, 47, 51, 40, 43, 6, 109, 3, 42, 63, 48, 99, 86, 98, 37, 42, 50, 124, 12, 104, 7, 87, 80, 95, 63]" ], "var": [ "str", "len", "valp" ] }, { "value": [ "\"nlnrrsxtxwxcjfliaajj\"", "108", "[82, 113, 17, 115, 103, 63, 102, 30, 19, 104, 85, 122, 28, 16, 105, 108, 37, 72, 89, 100, 119, 65, 81, 40, 96, 80, 12, 110, 85, 48, 115, 70]" ], "var": [ "str", "len", "valp" ] }, { "value": [ "\"qzlsvhwfn\"", "123", "[57, 41, 106, 0, 92, 84, 71, 77, 116, 39, 55, 86, 50, 76, 71, 84, 125, 51, 65, 75, 95, 117, 44, 82, 74, 98, 20, 97, 100, 6, 93, 67]" ], "var": [ "str", "len", "valp" ] }, { "value": [ "\"fcteuqtrxdgtwnwvkbstkwjsrvxkxq\"", "114", "[119, 121, 87, 125, 79, 68, 68, 96, 0, 122, 26, 62, 6, 28, 14, 97, 38, 68, 95, 1, 50, 74, 73, 112, 36, 105, 103, 85, 30, 125, 123, 93]" ], "var": [ "str", "len", "valp" ] }, { "value": [ "\"eyjqmadtmyhrngyzods\"", "112", "[108, 69, 17, 30, 119, 77, 115, 74, 15, 96, 99, 75, 96, 37, 68, 39, 10, 110, 63, 4, 90, 17, 105, 112, 50, 98, 18, 41, 79, 32, 119, 25]" ], "var": [ "str", "len", "valp" ] }, { "value": [ "\"rzgy\"", "2", "[66, 46, 24, 90, 116, 16, 125, 106, 88, 48, 51, 112, 13, 9, 120, 63, 80, 101, 29, 89, 1, 110, 114, 63, 72, 110, 122, 106, 11, 60, 32, 124]" ], "var": [ "str", "len", "valp" ] }, { "value": [ "\"kdigiushgpdnrwfeiml\"", "34", "[71, 90, 44, 123, 77, 110, 108, 124, 71, 26, 72, 119, 56, 28, 45, 104, 46, 101, 72, 32, 40, 47, 90, 62, 15, 80, 36, 2, 48, 125, 61, 84]" ], "var": [ "str", "len", "valp" ] }, { "value": [ "\"pojxcuhugjjbnbognwrgfhzavsqln\"", "41", "[6, 122, 32, 54, 73, 109, 102, 106, 19, 58, 44, 15, 89, 37, 14, 61, 101, 88, 77, 102, 115, 34, 73, 41, 55, 31, 70, 58, 27, 6, 98, 52]" ], "var": [ "str", "len", "valp" ] }, { "value": [ "\"phzipkgsrfuurvq\"", "57", "[16, 39, 123, 118, 16, 90, 92, 48, 121, 2, 102, 44, 30, 108, 52, 22, 92, 1, 119, 52, 106, 80, 2, 74, 34, 21, 123, 20, 50, 39, 58, 5]" ], "var": [ "str", "len", "valp" ] } ], "output": [ { "value": [ "-1", "\"tsmlrfgmuuums\"", "[24, 102, 97, 17, 84, 90, 28, 29, 48, 70, 29, 113, 70, 121, 99, 74, 55, 95, 10, 55, 45, 100, 43, 36, 82, 88, 0, 26, 26, 6, 125, 50]" ], "var": [ "returnv", "str", "valp" ] }, { "value": [ "-1", "\"grmxnnmucxoaefaq\"", "[111, 38, 32, 119, 21, 91, 55, 67, 47, 51, 40, 43, 6, 109, 3, 42, 63, 48, 99, 86, 98, 37, 42, 50, 124, 12, 104, 7, 87, 80, 95, 63]" ], "var": [ "returnv", "str", "valp" ] }, { "value": [ "-1", "\"nlnrrsxtxwxcjfliaajj\"", "[82, 113, 17, 115, 103, 63, 102, 30, 19, 104, 85, 122, 28, 16, 105, 108, 37, 72, 89, 100, 119, 65, 81, 40, 96, 80, 12, 110, 85, 48, 115, 70]" ], "var": [ "returnv", "str", "valp" ] }, { "value": [ "-1", "\"qzlsvhwfn\"", "[57, 41, 106, 0, 92, 84, 71, 77, 116, 39, 55, 86, 50, 76, 71, 84, 125, 51, 65, 75, 95, 117, 44, 82, 74, 98, 20, 97, 100, 6, 93, 67]" ], "var": [ "returnv", "str", "valp" ] }, { "value": [ "-1", "\"fcteuqtrxdgtwnwvkbstkwjsrvxkxq\"", "[119, 121, 87, 125, 79, 68, 68, 96, 0, 122, 26, 62, 6, 28, 14, 97, 38, 68, 95, 1, 50, 74, 73, 112, 36, 105, 103, 85, 30, 125, 123, 93]" ], "var": [ "returnv", "str", "valp" ] }, { "value": [ "-1", "\"eyjqmadtmyhrngyzods\"", "[108, 69, 17, 30, 119, 77, 115, 74, 15, 96, 99, 75, 96, 37, 68, 39, 10, 110, 63, 4, 90, 17, 105, 112, 50, 98, 18, 41, 79, 32, 119, 25]" ], "var": [ "returnv", "str", "valp" ] }, { "value": [ "-1", "\"rzgy\"", "[66, 46, 24, 90, 116, 16, 125, 106, 88, 48, 51, 112, 13, 9, 120, 63, 80, 101, 29, 89, 1, 110, 114, 63, 72, 110, 122, 106, 11, 60, 32, 124]" ], "var": [ "returnv", "str", "valp" ] }, { "value": [ "-1", "\"kdigiushgpdnrwfeiml\"", "[71, 90, 44, 123, 77, 110, 108, 124, 71, 26, 72, 119, 56, 28, 45, 104, 46, 101, 72, 32, 40, 47, 90, 62, 15, 80, 36, 2, 48, 125, 61, 84]" ], "var": [ "returnv", "str", "valp" ] }, { "value": [ "-1", "\"pojxcuhugjjbnbognwrgfhzavsqln\"", "[6, 122, 32, 54, 73, 109, 102, 106, 19, 58, 44, 15, 89, 37, 14, 61, 101, 88, 77, 102, 115, 34, 73, 41, 55, 31, 70, 58, 27, 6, 98, 52]" ], "var": [ "returnv", "str", "valp" ] }, { "value": [ "-1", "\"phzipkgsrfuurvq\"", "[16, 39, 123, 118, 16, 90, 92, 48, 121, 2, 102, 44, 30, 108, 52, 22, 92, 1, 119, 52, 106, 80, 2, 74, 34, 21, 123, 20, 50, 39, 58, 5]" ], "var": [ "returnv", "str", "valp" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_37ztfm68xj.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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, long int len, int* valp, int returnv) { json output_json; output_json["str"] = str; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = valp[i3]; output_temp_2.push_back(output_temp_4); } output_json["valp"] = 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); char* str = strdup(input_json["str"].get<std::string>().c_str()); long int len = input_json["len"]; std::vector<int> input_temp_1_vec; for (auto& elem : input_json["valp"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* valp = &input_temp_1_vec[0]; clock_t begin = clock(); int returnv = rsock_ip_level_to_int(str, len, valp); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(str, len, valp, returnv); }
master
null
{"livein": ["str", "len", "valp"], "liveout": ["str", "valp"], "returnvarname": ["returnv"], "execcmd": "", "funname": "rsock_ip_level_to_int", "funargs": ["str", "len", "valp"], "typemap": {"str": "string", "len": "int64", "valp": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_37ztfm68xj.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
OrangeTide/build/example/d/d.c
int calculate(int a, int b) { return a + b; }
int calculate(inta, intb)
int calculate(int a, int b)
calculate
[ "int", "int", "int" ]
{ "code": [ ".globl calculate\n.type calculate, @function\ncalculate:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %edx\n\tmovl\t-8(%rbp), %eax\n\taddl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl calculate\n.type calculate, @function\ncalculate:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl calculate\n.type calculate, @function\ncalculate:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global calculate\n.type calculate, %function\ncalculate:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global calculate\n.type calculate, %function\ncalculate:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global calculate\n.type calculate, %function\ncalculate:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "40", "112" ], "var": [ "a", "b" ] }, { "value": [ "78", "98" ], "var": [ "a", "b" ] }, { "value": [ "69", "2" ], "var": [ "a", "b" ] }, { "value": [ "45", "112" ], "var": [ "a", "b" ] }, { "value": [ "116", "121" ], "var": [ "a", "b" ] }, { "value": [ "123", "116" ], "var": [ "a", "b" ] }, { "value": [ "82", "29" ], "var": [ "a", "b" ] }, { "value": [ "87", "109" ], "var": [ "a", "b" ] }, { "value": [ "10", "26" ], "var": [ "a", "b" ] }, { "value": [ "106", "37" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "152" ], "var": [ "returnv" ] }, { "value": [ "176" ], "var": [ "returnv" ] }, { "value": [ "71" ], "var": [ "returnv" ] }, { "value": [ "157" ], "var": [ "returnv" ] }, { "value": [ "237" ], "var": [ "returnv" ] }, { "value": [ "239" ], "var": [ "returnv" ] }, { "value": [ "111" ], "var": [ "returnv" ] }, { "value": [ "196" ], "var": [ "returnv" ] }, { "value": [ "36" ], "var": [ "returnv" ] }, { "value": [ "143" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_32_j2maovy.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = calculate(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": "calculate", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32_j2maovy.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Gurgel100/gcc/gcc/testsuite/gcc.c-torture/execute/20031003-1.c
int f1() { return (int)2147483648.0f; }
int f1()
int f1()
f1
[ "int", "" ]
{ "code": [ ".globl f1\n.type f1, @function\nf1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$2147483647, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f1\n.type f1, @function\nf1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$2147483647, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl f1\n.type f1, @function\nf1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$2147483647, %eax\n\tret\n\t.cfi_endproc\n\n", ".global f1\n.type f1, %function\nf1:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 2147483647\n\tret\n\t.cfi_endproc\n\n", ".global f1\n.type f1, %function\nf1:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 2147483647\n\tret\n\t.cfi_endproc\n\n", ".global f1\n.type f1, %function\nf1:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 2147483647\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <limits.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_62c418kjla.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = f1(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
apple-llvmgcc42_Embedded
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "f1", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62c418kjla.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
dart-lang/ffigen/test/native_test/native_test.c
float Function1Float(float x) { return x + 42.0f; }
float Function1Float(floatx)
float Function1Float(float x)
Function1Float
[ "float", "float" ]
{ "code": [ ".globl Function1Float\n.type Function1Float, @function\nFunction1Float:\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), %xmm1\n\tmovss\t.LC0(%rip), %xmm0\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\t1109917696\n", ".globl Function1Float\n.type Function1Float, @function\nFunction1Float:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\taddss\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1109917696\n", ".globl Function1Float\n.type Function1Float, @function\nFunction1Float:\n.LFB16:\n\t.cfi_startproc\n\tendbr64\n\taddss\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1109917696\n", ".global Function1Float\n.type Function1Float, %function\nFunction1Float:\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\tmov\tw0, 1109917696\n\tfmov\ts1, w0\n\tfadd\ts0, s0, s1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global Function1Float\n.type Function1Float, %function\nFunction1Float:\n.LFB11:\n\t.cfi_startproc\n\tmov\tw0, 1109917696\n\tfmov\ts1, w0\n\tfadd\ts0, s0, s1\n\tret\n\t.cfi_endproc\n\n", ".global Function1Float\n.type Function1Float, %function\nFunction1Float:\n.LFB16:\n\t.cfi_startproc\n\tmov\tw0, 1109917696\n\tfmov\ts1, w0\n\tfadd\ts0, 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
#include <stdint.h> #include <stdlib.h> #include <stdbool.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "31.7259172351" ], "var": [ "x" ] }, { "value": [ "16.0576833935" ], "var": [ "x" ] }, { "value": [ "13.7747793336" ], "var": [ "x" ] }, { "value": [ "44.5604047978" ], "var": [ "x" ] }, { "value": [ "56.6675497194" ], "var": [ "x" ] }, { "value": [ "60.0015774337" ], "var": [ "x" ] }, { "value": [ "77.1235966481" ], "var": [ "x" ] }, { "value": [ "99.8466399254" ], "var": [ "x" ] }, { "value": [ "27.3382747921" ], "var": [ "x" ] }, { "value": [ "66.0608606324" ], "var": [ "x" ] } ], "output": [ { "value": [ "73.72592163085938" ], "var": [ "returnv" ] }, { "value": [ "58.05768585205078" ], "var": [ "returnv" ] }, { "value": [ "55.7747802734375" ], "var": [ "returnv" ] }, { "value": [ "86.56040954589844" ], "var": [ "returnv" ] }, { "value": [ "98.66754913330078" ], "var": [ "returnv" ] }, { "value": [ "102.00157928466797" ], "var": [ "returnv" ] }, { "value": [ "119.12359619140625" ], "var": [ "returnv" ] }, { "value": [ "141.84664916992188" ], "var": [ "returnv" ] }, { "value": [ "69.33827209472656" ], "var": [ "returnv" ] }, { "value": [ "108.06085968017578" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_345bncut00.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = Function1Float(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": "Function1Float", "funargs": ["x"], "typemap": {"x": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_345bncut00.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ruipimenta/newOseaClassifier/qrsfilt.c
int deriv1(int x, int init) { static int derBuff[2], derI = 0 ; int y ; if(init != 0) { for(derI = 0; derI < 2; ++derI) derBuff[derI] = 0 ; derI = 0 ; return(0) ; } y = x - derBuff[derI] ; derBuff[derI] = x ; if(++derI == 2) derI = 0 ; return(y) ; }
int deriv1(intx, intinit)
int deriv1(int x, int init)
deriv1
[ "int", "int", "int" ]
{ "code": [ ".globl deriv1\n.type deriv1, @function\nderiv1:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tcmpl\t$0, -24(%rbp)\n\tje\t.L2\n\tmovl\t$0, derI.3552(%rip)\n\tjmp\t.L3\n.L4:\n\tmovl\tderI.3552(%rip), %eax\n\tcltq\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\tderBuff.3551(%rip), %rax\n\tmovl\t$0, (%rdx,%rax)\n\tmovl\tderI.3552(%rip), %eax\n\taddl\t$1, %eax\n\tmovl\t%eax, derI.3552(%rip)\n.L3:\n\tmovl\tderI.3552(%rip), %eax\n\tcmpl\t$1, %eax\n\tjle\t.L4\n\tmovl\t$0, derI.3552(%rip)\n\tmovl\t$0, %eax\n\tjmp\t.L5\n.L2:\n\tmovl\tderI.3552(%rip), %eax\n\tcltq\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\tderBuff.3551(%rip), %rax\n\tmovl\t(%rdx,%rax), %eax\n\tmovl\t-20(%rbp), %edx\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\tderI.3552(%rip), %eax\n\tcltq\n\tleaq\t0(,%rax,4), %rcx\n\tleaq\tderBuff.3551(%rip), %rdx\n\tmovl\t-20(%rbp), %eax\n\tmovl\t%eax, (%rcx,%rdx)\n\tmovl\tderI.3552(%rip), %eax\n\taddl\t$1, %eax\n\tmovl\t%eax, derI.3552(%rip)\n\tmovl\tderI.3552(%rip), %eax\n\tcmpl\t$2, %eax\n\tjne\t.L6\n\tmovl\t$0, derI.3552(%rip)\n.L6:\n\tmovl\t-4(%rbp), %eax\n.L5:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl deriv1\n.type deriv1, @function\nderiv1:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%esi, %esi\n\tje\t.L2\n\tmovq\t$0, derBuff.3638(%rip)\n\txorl\t%r8d, %r8d\n\tmovl\t$0, derI.3639(%rip)\n\tjmp\t.L1\n.L2:\n\tmovslq\tderI.3639(%rip), %rcx\n\tleaq\tderBuff.3638(%rip), %rax\n\tmovl\t%edi, %r8d\n\tmovq\t%rcx, %rdx\n\tsubl\t(%rax,%rcx,4), %r8d\n\tmovl\t%edi, (%rax,%rcx,4)\n\tleal\t1(%rcx), %eax\n\tdecl\t%edx\n\tcmovne\t%eax, %esi\n\tmovl\t%esi, derI.3639(%rip)\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl deriv1\n.type deriv1, @function\nderiv1:\n.LFB16:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%esi, %esi\n\tjne\t.L6\n\tmovslq\tderI.3666(%rip), %rcx\n\tleaq\tderBuff.3665(%rip), %rax\n\tmovl\t%edi, %r8d\n\tsubl\t(%rax,%rcx,4), %r8d\n\tmovl\t%edi, (%rax,%rcx,4)\n\tcmpl\t$1, %ecx\n\tleal\t1(%rcx), %eax\n\tcmovne\t%eax, %esi\n\tmovl\t%r8d, %eax\n\tmovl\t%esi, derI.3666(%rip)\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tmovq\t$0, derBuff.3665(%rip)\n\txorl\t%r8d, %r8d\n\tmovl\t$0, derI.3666(%rip)\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".global deriv1\n.type deriv1, %function\nderiv1:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 0\n\tbeq\t.L2\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tstr\twzr, [x0]\n\tb\t.L3\n.L4:\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tldr\tw1, [x0]\n\tadrp\tx0, derBuff.5079\n\tadd\tx0, x0, :lo12:derBuff.5079\n\tsxtw\tx1, w1\n\tstr\twzr, [x0, x1, lsl 2]\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tldr\tw0, [x0]\n\tadd\tw1, w0, 1\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tstr\tw1, [x0]\n.L3:\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tldr\tw0, [x0]\n\tcmp\tw0, 1\n\tble\t.L4\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tstr\twzr, [x0]\n\tmov\tw0, 0\n\tb\t.L5\n.L2:\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tldr\tw1, [x0]\n\tadrp\tx0, derBuff.5079\n\tadd\tx0, x0, :lo12:derBuff.5079\n\tsxtw\tx1, w1\n\tldr\tw0, [x0, x1, lsl 2]\n\tldr\tw1, [sp, 12]\n\tsub\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tldr\tw1, [x0]\n\tadrp\tx0, derBuff.5079\n\tadd\tx0, x0, :lo12:derBuff.5079\n\tsxtw\tx1, w1\n\tldr\tw2, [sp, 12]\n\tstr\tw2, [x0, x1, lsl 2]\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tldr\tw0, [x0]\n\tadd\tw1, w0, 1\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tstr\tw1, [x0]\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tldr\tw0, [x0]\n\tcmp\tw0, 2\n\tbne\t.L6\n\tadrp\tx0, derI.5080\n\tadd\tx0, x0, :lo12:derI.5080\n\tstr\twzr, [x0]\n.L6:\n\tldr\tw0, [sp, 28]\n.L5:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global deriv1\n.type deriv1, %function\nderiv1:\n.LFB11:\n\t.cfi_startproc\n\tmov\tw4, w0\n\tadrp\tx2, .LANCHOR0\n\tcbz\tw1, .L2\n\tadd\tx1, x2, :lo12:.LANCHOR0\n\tmov\tw0, 0\n\tstr\txzr, [x1]\n\tstr\twzr, [x1, 8]\n.L1:\n\tret\n.L2:\n\tadd\tx1, x2, :lo12:.LANCHOR0\n\tldr\tw2, [x1, 8]\n\tcmp\tw2, 1\n\tsxtw\tx5, w2\n\tcsinc\tw2, wzr, w2, eq\n\tstr\tw2, [x1, 8]\n\tldr\tw3, [x1, x5, lsl 2]\n\tstr\tw4, [x1, x5, lsl 2]\n\tsub\tw0, w0, w3\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global deriv1\n.type deriv1, %function\nderiv1:\n.LFB16:\n\t.cfi_startproc\n\tcbnz\tw1, .L6\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldr\tw2, [x1, 8]\n\tcmp\tw2, 1\n\tsxtw\tx3, w2\n\tcsinc\tw2, wzr, w2, eq\n\tstr\tw2, [x1, 8]\n\tldr\tw2, [x1, x3, lsl 2]\n\tstr\tw0, [x1, x3, lsl 2]\n\tsub\tw0, w0, w2\n\tret\n\t.p2align 2,,3\n.L6:\n\tadrp\tx1, .LANCHOR0\n\tadd\tx2, x1, :lo12:.LANCHOR0\n\tmov\tw0, 0\n\tstr\txzr, [x1, #:lo12:.LANCHOR0]\n\tstr\twzr, [x2, 8]\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <math.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "71", "5" ], "var": [ "x", "init" ] }, { "value": [ "81", "38" ], "var": [ "x", "init" ] }, { "value": [ "108", "36" ], "var": [ "x", "init" ] }, { "value": [ "65", "45" ], "var": [ "x", "init" ] }, { "value": [ "68", "49" ], "var": [ "x", "init" ] }, { "value": [ "92", "7" ], "var": [ "x", "init" ] }, { "value": [ "78", "22" ], "var": [ "x", "init" ] }, { "value": [ "106", "7" ], "var": [ "x", "init" ] }, { "value": [ "17", "83" ], "var": [ "x", "init" ] }, { "value": [ "91", "123" ], "var": [ "x", "init" ] } ], "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_63g3ccv9od.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 init, 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 init = input_json["init"]; clock_t begin = clock(); int returnv = deriv1(x, init); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, init, returnv); }
master
null
{"livein": ["x", "init"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "deriv1", "funargs": ["x", "init"], "typemap": {"x": "int32", "init": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63g3ccv9od.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
cjamthagen/backdoor_deterministic_code/step2.c
int t2(int b) { }
int t2(intb)
int t2(int b)
t2
[ "int", "int" ]
{ "code": [ ".globl t2\n.type t2, @function\nt2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl t2\n.type t2, @function\nt2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl t2\n.type t2, @function\nt2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global t2\n.type t2, %function\nt2:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tnop\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global t2\n.type t2, %function\nt2:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global t2\n.type t2, %function\nt2:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "54" ], "var": [ "b" ] }, { "value": [ "81" ], "var": [ "b" ] }, { "value": [ "73" ], "var": [ "b" ] }, { "value": [ "39" ], "var": [ "b" ] }, { "value": [ "103" ], "var": [ "b" ] }, { "value": [ "44" ], "var": [ "b" ] }, { "value": [ "35" ], "var": [ "b" ] }, { "value": [ "68" ], "var": [ "b" ] }, { "value": [ "84" ], "var": [ "b" ] }, { "value": [ "48" ], "var": [ "b" ] } ], "output": [ { "value": [ "54" ], "var": [ "returnv" ] }, { "value": [ "81" ], "var": [ "returnv" ] }, { "value": [ "73" ], "var": [ "returnv" ] }, { "value": [ "39" ], "var": [ "returnv" ] }, { "value": [ "103" ], "var": [ "returnv" ] }, { "value": [ "44" ], "var": [ "returnv" ] }, { "value": [ "35" ], "var": [ "returnv" ] }, { "value": [ "68" ], "var": [ "returnv" ] }, { "value": [ "84" ], "var": [ "returnv" ] }, { "value": [ "48" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_52p2zrruvs.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 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"]; clock_t begin = clock(); int returnv = t2(b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(b, returnv); }
master
null
{"livein": ["b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "t2", "funargs": ["b"], "typemap": {"b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_52p2zrruvs.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
wabbit01/odroid-xu-support/temp-exynos5-hwcomposer-changed-files/sync.c
int sync_merge(const char *name, int fd1, int fd2) { # 64 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/wabbit01/odroid-xu-support/refs/heads/master/temp-exynos5-hwcomposer-changed-files/sync.c" return 0; }
int sync_merge(const char *name, intfd1, intfd2)
int sync_merge(const char *name, int fd1, int fd2)
sync_merge
[ "int", "const char *", "int", "int" ]
{ "code": [ ".globl sync_merge\n.type sync_merge, @function\nsync_merge:\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$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl sync_merge\n.type sync_merge, @function\nsync_merge:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl sync_merge\n.type sync_merge, @function\nsync_merge:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global sync_merge\n.type sync_merge, %function\nsync_merge:\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, 0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global sync_merge\n.type sync_merge, %function\nsync_merge:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global sync_merge\n.type sync_merge, %function\nsync_merge:\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": [ "\"nrvnaksxfyw\"", "96", "32" ], "var": [ "name", "fd1", "fd2" ] }, { "value": [ "\"jiida\"", "101", "76" ], "var": [ "name", "fd1", "fd2" ] }, { "value": [ "\"zypdhymiwmuqcikukiube\"", "86", "66" ], "var": [ "name", "fd1", "fd2" ] }, { "value": [ "\"rqxloqgrijrbhjrz\"", "29", "12" ], "var": [ "name", "fd1", "fd2" ] }, { "value": [ "\"dcdwwhbt\"", "42", "20" ], "var": [ "name", "fd1", "fd2" ] }, { "value": [ "\"wljuxxyxgipr\"", "92", "29" ], "var": [ "name", "fd1", "fd2" ] }, { "value": [ "\"daeewzmxxkah\"", "48", "126" ], "var": [ "name", "fd1", "fd2" ] }, { "value": [ "\"bdhdhbccwjgzrwsyryzlqaxktrj\"", "43", "122" ], "var": [ "name", "fd1", "fd2" ] }, { "value": [ "\"fpbqfmzajfzjjbnprfilqhjws\"", "12", "73" ], "var": [ "name", "fd1", "fd2" ] }, { "value": [ "\"ycuxcesgksjsjcuernnqaisrlhxorrq\"", "31", "115" ], "var": [ "name", "fd1", "fd2" ] } ], "output": [ { "value": [ "\"nrvnaksxfyw\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"jiida\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"zypdhymiwmuqcikukiube\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"rqxloqgrijrbhjrz\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"dcdwwhbt\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"wljuxxyxgipr\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"daeewzmxxkah\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"bdhdhbccwjgzrwsyryzlqaxktrj\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"fpbqfmzajfzjjbnprfilqhjws\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"ycuxcesgksjsjcuernnqaisrlhxorrq\"", "0" ], "var": [ "name", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_51yda18436.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 fd1, int fd2, 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 fd1 = input_json["fd1"]; int fd2 = input_json["fd2"]; clock_t begin = clock(); int returnv = sync_merge(name, fd1, fd2); clock_t end = 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, fd1, fd2, returnv); }
master
null
{"livein": ["name", "fd1", "fd2"], "liveout": ["name"], "returnvarname": ["returnv"], "execcmd": "", "funname": "sync_merge", "funargs": ["name", "fd1", "fd2"], "typemap": {"name": "string", "fd1": "int32", "fd2": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_51yda18436.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
bmybbs/bmybbs/libbmy/convcode.c
int is_utf_special_byte(unsigned char c){ unsigned special_byte = 0X02; if(c>>6==special_byte) return 1; else return 0; }
int is_utf_special_byte(unsigned charc)
int is_utf_special_byte(unsigned char c)
is_utf_special_byte
[ "int", "unsigned char" ]
{ "code": [ ".globl is_utf_special_byte\n.type is_utf_special_byte, @function\nis_utf_special_byte:\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, -20(%rbp)\n\tmovl\t$2, -4(%rbp)\n\tmovzbl\t-20(%rbp), %eax\n\tshrb\t$6, %al\n\tmovzbl\t%al, %eax\n\tcmpl\t%eax, -4(%rbp)\n\tjne\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl is_utf_special_byte\n.type is_utf_special_byte, @function\nis_utf_special_byte:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\tshrb\t$6, %dil\n\txorl\t%eax, %eax\n\tcmpb\t$2, %dil\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl is_utf_special_byte\n.type is_utf_special_byte, @function\nis_utf_special_byte:\n.LFB27:\n\t.cfi_startproc\n\tendbr64\n\tshrb\t$6, %dil\n\txorl\t%eax, %eax\n\tcmpb\t$2, %dil\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n", ".global is_utf_special_byte\n.type is_utf_special_byte, %function\nis_utf_special_byte:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstrb\tw0, [sp, 15]\n\tmov\tw0, 2\n\tstr\tw0, [sp, 28]\n\tldrb\tw0, [sp, 15]\n\tlsr\tw0, w0, 6\n\tand\tw0, w0, 255\n\tmov\tw1, w0\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, w1\n\tbne\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global is_utf_special_byte\n.type is_utf_special_byte, %function\nis_utf_special_byte:\n.LFB22:\n\t.cfi_startproc\n\tubfx\tw0, w0, 6, 2\n\tcmp\tw0, 2\n\tcset\tw0, eq\n\tret\n\t.cfi_endproc\n\n", ".global is_utf_special_byte\n.type is_utf_special_byte, %function\nis_utf_special_byte:\n.LFB27:\n\t.cfi_startproc\n\tubfx\tw0, w0, 6, 2\n\tcmp\tw0, 2\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> #include <stdlib.h> #include <iconv.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": [ "380" ], "var": [ "c" ] }, { "value": [ "710" ], "var": [ "c" ] }, { "value": [ "46" ], "var": [ "c" ] }, { "value": [ "892" ], "var": [ "c" ] }, { "value": [ "3" ], "var": [ "c" ] }, { "value": [ "649" ], "var": [ "c" ] }, { "value": [ "721" ], "var": [ "c" ] }, { "value": [ "650" ], "var": [ "c" ] }, { "value": [ "353" ], "var": [ "c" ] }, { "value": [ "763" ], "var": [ "c" ] } ], "output": [ { "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": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_45z6tnfckh.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 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); unsigned char c = input_json["c"]; clock_t begin = clock(); int returnv = is_utf_special_byte(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_utf_special_byte", "funargs": ["c"], "typemap": {"c": "uint8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45z6tnfckh.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_451() { return 451; }
int do_451()
int do_451()
do_451
[ "int", "" ]
{ "code": [ ".globl do_451\n.type do_451, @function\ndo_451:\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$451, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_451\n.type do_451, @function\ndo_451:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$451, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_451\n.type do_451, @function\ndo_451:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$451, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_451\n.type do_451, %function\ndo_451:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 451\n\tret\n\t.cfi_endproc\n\n", ".global do_451\n.type do_451, %function\ndo_451:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 451\n\tret\n\t.cfi_endproc\n\n", ".global do_451\n.type do_451, %function\ndo_451:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 451\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "451" ], "var": [ "returnv" ] }, { "value": [ "451" ], "var": [ "returnv" ] }, { "value": [ "451" ], "var": [ "returnv" ] }, { "value": [ "451" ], "var": [ "returnv" ] }, { "value": [ "451" ], "var": [ "returnv" ] }, { "value": [ "451" ], "var": [ "returnv" ] }, { "value": [ "451" ], "var": [ "returnv" ] }, { "value": [ "451" ], "var": [ "returnv" ] }, { "value": [ "451" ], "var": [ "returnv" ] }, { "value": [ "451" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53ntjxkpe4.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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_451(); clock_t end = 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_451", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53ntjxkpe4.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
hiseba/project_euler/problems/014.c
int collatz(long int n){ int iter = 0; while(1){ if(n%2==0) {n/=2; iter++;} else{ if(n==1) return iter; else {n=3*n+1; iter++;} }} }
int collatz(longn)
int collatz(long int n)
collatz
[ "int", "long" ]
{ "code": [ ".globl collatz\n.type collatz, @function\ncollatz:\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.L6:\n\tmovq\t-24(%rbp), %rax\n\tandl\t$1, %eax\n\ttestq\t%rax, %rax\n\tjne\t.L2\n\tmovq\t-24(%rbp), %rax\n\tmovq\t%rax, %rdx\n\tshrq\t$63, %rdx\n\taddq\t%rdx, %rax\n\tsarq\t%rax\n\tmovq\t%rax, -24(%rbp)\n\taddl\t$1, -4(%rbp)\n\tjmp\t.L6\n.L2:\n\tcmpq\t$1, -24(%rbp)\n\tjne\t.L4\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L7\n.L4:\n\tmovq\t-24(%rbp), %rdx\n\tmovq\t%rdx, %rax\n\taddq\t%rax, %rax\n\taddq\t%rdx, %rax\n\taddq\t$1, %rax\n\tmovq\t%rax, -24(%rbp)\n\taddl\t$1, -4(%rbp)\n\tjmp\t.L6\n.L7:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl collatz\n.type collatz, @function\ncollatz:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\txorl\t%r8d, %r8d\n\tmovl\t$2, %ecx\n.L2:\n\ttestb\t$1, %al\n\tjne\t.L3\n\tcqto\n\tidivq\t%rcx\n.L4:\n\tincl\t%r8d\n\tjmp\t.L2\n.L3:\n\tcmpq\t$1, %rax\n\tje\t.L6\n\tleaq\t(%rax,%rax,2), %rax\n\tincq\t%rax\n\tjmp\t.L4\n.L6:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl collatz\n.type collatz, @function\ncollatz:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tjmp\t.L2\n\t.p2align 4,,10\n\t.p2align 3\n.L8:\n\tmovq\t%rdi, %rdx\n\tshrq\t$63, %rdx\n\taddq\t%rdx, %rdi\n\tsarq\t%rdi\n.L4:\n\taddl\t$1, %eax\n.L2:\n\ttestb\t$1, %dil\n\tje\t.L8\n\tcmpq\t$1, %rdi\n\tje\t.L6\n\tleaq\t1(%rdi,%rdi,2), %rdi\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tret\n\t.cfi_endproc\n\n", ".global collatz\n.type collatz, %function\ncollatz:\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.L6:\n\tldr\tx0, [sp, 8]\n\tand\tx0, x0, 1\n\tcmp\tx0, 0\n\tbne\t.L2\n\tldr\tx0, [sp, 8]\n\tlsr\tx1, x0, 63\n\tadd\tx0, x1, x0\n\tasr\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n\tb\t.L6\n.L2:\n\tldr\tx0, [sp, 8]\n\tcmp\tx0, 1\n\tbne\t.L4\n\tldr\tw0, [sp, 28]\n\tb\t.L7\n.L4:\n\tldr\tx1, [sp, 8]\n\tmov\tx0, x1\n\tlsl\tx0, x0, 1\n\tadd\tx0, x0, x1\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n\tb\t.L6\n.L7:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global collatz\n.type collatz, %function\ncollatz:\n.LFB13:\n\t.cfi_startproc\n\tmov\tx1, x0\n\tmov\tx2, 2\n\tmov\tw0, 0\n.L2:\n\ttbnz\tx1, 0, .L3\n\tsdiv\tx1, x1, x2\n.L4:\n\tadd\tw0, w0, 1\n\tb\t.L2\n.L3:\n\tcmp\tx1, 1\n\tbeq\t.L6\n\tadd\tx1, x1, x1, lsl 1\n\tadd\tx1, x1, 1\n\tb\t.L4\n.L6:\n\tret\n\t.cfi_endproc\n\n", ".global collatz\n.type collatz, %function\ncollatz:\n.LFB23:\n\t.cfi_startproc\n\tmov\tx1, x0\n\tmov\tw0, 0\n\tadd\tx2, x1, x1, lsr 63\n\tadd\tx3, x1, x1, lsl 1\n\ttbnz\tx1, 0, .L3\n\t.p2align 3,,7\n.L8:\n\tasr\tx1, x2, 1\n\tadd\tw0, w0, 1\n.L9:\n\tadd\tx2, x1, x1, lsr 63\n\tadd\tx3, x1, x1, lsl 1\n\ttbz\tx1, 0, .L8\n.L3:\n\tcmp\tx1, 1\n\tbeq\t.L6\n\tadd\tx1, x3, 1\n\tadd\tw0, w0, 1\n\tb\t.L9\n\t.p2align 2,,3\n.L6:\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "68" ], "var": [ "n" ] }, { "value": [ "67" ], "var": [ "n" ] }, { "value": [ "23" ], "var": [ "n" ] }, { "value": [ "108" ], "var": [ "n" ] }, { "value": [ "64" ], "var": [ "n" ] }, { "value": [ "73" ], "var": [ "n" ] }, { "value": [ "12" ], "var": [ "n" ] }, { "value": [ "21" ], "var": [ "n" ] }, { "value": [ "31" ], "var": [ "n" ] }, { "value": [ "29" ], "var": [ "n" ] } ], "output": [ { "value": [ "14" ], "var": [ "returnv" ] }, { "value": [ "27" ], "var": [ "returnv" ] }, { "value": [ "15" ], "var": [ "returnv" ] }, { "value": [ "113" ], "var": [ "returnv" ] }, { "value": [ "6" ], "var": [ "returnv" ] }, { "value": [ "115" ], "var": [ "returnv" ] }, { "value": [ "9" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "106" ], "var": [ "returnv" ] }, { "value": [ "18" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_29v2ftoshj.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(long int 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); long int n = input_json["n"]; clock_t begin = clock(); int returnv = collatz(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": "collatz", "funargs": ["n"], "typemap": {"n": "int64", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_29v2ftoshj.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
hnal/ex30/ex30.c
int regina(int x) { return x+23; }
int regina(intx)
int regina(int x)
regina
[ "int", "int" ]
{ "code": [ ".globl regina\n.type regina, @function\nregina:\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$23, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl regina\n.type regina, @function\nregina:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t23(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl regina\n.type regina, @function\nregina:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t23(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global regina\n.type regina, %function\nregina:\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, 23\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global regina\n.type regina, %function\nregina:\n.LFB13:\n\t.cfi_startproc\n\tadd\tw0, w0, 23\n\tret\n\t.cfi_endproc\n\n", ".global regina\n.type regina, %function\nregina:\n.LFB23:\n\t.cfi_startproc\n\tadd\tw0, w0, 23\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "42" ], "var": [ "x" ] }, { "value": [ "97" ], "var": [ "x" ] }, { "value": [ "121" ], "var": [ "x" ] }, { "value": [ "102" ], "var": [ "x" ] }, { "value": [ "91" ], "var": [ "x" ] }, { "value": [ "42" ], "var": [ "x" ] }, { "value": [ "23" ], "var": [ "x" ] }, { "value": [ "52" ], "var": [ "x" ] }, { "value": [ "11" ], "var": [ "x" ] }, { "value": [ "63" ], "var": [ "x" ] } ], "output": [ { "value": [ "65" ], "var": [ "returnv" ] }, { "value": [ "120" ], "var": [ "returnv" ] }, { "value": [ "144" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "114" ], "var": [ "returnv" ] }, { "value": [ "65" ], "var": [ "returnv" ] }, { "value": [ "46" ], "var": [ "returnv" ] }, { "value": [ "75" ], "var": [ "returnv" ] }, { "value": [ "34" ], "var": [ "returnv" ] }, { "value": [ "86" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_45_c4qhqxd.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = regina(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": "regina", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45_c4qhqxd.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
rulan87/devclab.bc/bc/2/arrayAbs.c
void arrayAbs(int array[], int size) { for ( int i = 0; i < size; i++ ) { if ( array[i] < 0 ) { array[i] *= -1; } } }
void arrayAbs(int *array, intsize)
void arrayAbs(int array[], int size)
arrayAbs
[ "void", "int *", "int" ]
{ "code": [ ".globl arrayAbs\n.type arrayAbs, @function\narrayAbs:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovl\t%esi, -28(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L4:\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\ttestl\t%eax, %eax\n\tjns\t.L3\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tleaq\t0(,%rax,4), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovl\t(%rax), %edx\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tleaq\t0(,%rax,4), %rcx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rcx, %rax\n\tnegl\t%edx\n\tmovl\t%edx, (%rax)\n.L3:\n\taddl\t$1, -4(%rbp)\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-28(%rbp), %eax\n\tjl\t.L4\n\tnop\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl arrayAbs\n.type arrayAbs, @function\narrayAbs:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n.L2:\n\tcmpl\t%eax, %esi\n\tjle\t.L6\n\tmovl\t(%rdi,%rax,4), %edx\n\ttestl\t%edx, %edx\n\tjns\t.L3\n\tnegl\t%edx\n\tmovl\t%edx, (%rdi,%rax,4)\n.L3:\n\tincq\t%rax\n\tjmp\t.L2\n.L6:\n\tret\n\t.cfi_endproc\n\n", ".globl arrayAbs\n.type arrayAbs, @function\narrayAbs:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%esi, %esi\n\tjle\t.L1\n\tleal\t-1(%rsi), %eax\n\tleaq\t4(%rdi,%rax,4), %rdx\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t(%rdi), %eax\n\ttestl\t%eax, %eax\n\tjns\t.L3\n\tnegl\t%eax\n\tmovl\t%eax, (%rdi)\n.L3:\n\taddq\t$4, %rdi\n\tcmpq\t%rdx, %rdi\n\tjne\t.L4\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global arrayAbs\n.type arrayAbs, %function\narrayAbs:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\tw1, [sp, 4]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L4:\n\tldrsw\tx0, [sp, 28]\n\tlsl\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldr\tw0, [x0]\n\tcmp\tw0, 0\n\tbge\t.L3\n\tldrsw\tx0, [sp, 28]\n\tlsl\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldr\tw1, [x0]\n\tldrsw\tx0, [sp, 28]\n\tlsl\tx0, x0, 2\n\tldr\tx2, [sp, 8]\n\tadd\tx0, x2, x0\n\tneg\tw1, w1\n\tstr\tw1, [x0]\n.L3:\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n.L2:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 4]\n\tcmp\tw1, w0\n\tblt\t.L4\n\tnop\n\tnop\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global arrayAbs\n.type arrayAbs, %function\narrayAbs:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx2, 0\n.L2:\n\tcmp\tw1, w2\n\tbgt\t.L4\n\tret\n.L4:\n\tldr\tw3, [x0, x2, lsl 2]\n\ttbz\tw3, #31, .L3\n\tneg\tw3, w3\n\tstr\tw3, [x0, x2, lsl 2]\n.L3:\n\tadd\tx2, x2, 1\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global arrayAbs\n.type arrayAbs, %function\narrayAbs:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw1, 0\n\tble\t.L1\n\tmov\tx2, 0\n\t.p2align 3,,7\n.L4:\n\tldr\tw3, [x0, x2, lsl 2]\n\tneg\tw4, w3\n\ttbz\tw3, #31, .L3\n\tstr\tw4, [x0, x2, lsl 2]\n.L3:\n\tadd\tx2, x2, 1\n\tcmp\tw1, w2\n\tbgt\t.L4\n.L1:\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[21, 24, 44, 51, 11, 24, 63, 10, 84, 28, 75, 45, 18, 53, 107, 33, 104, 124, 20, 47, 85, 123, 72, 105, 46, 121, 34, 101, 19, 86, 74, 8]", "39" ], "var": [ "array", "size" ] }, { "value": [ "[59, 28, 13, 119, 88, 122, 64, 8, 33, 36, 104, 104, 20, 115, 83, 70, 6, 122, 57, 9, 66, 102, 100, 126, 35, 54, 89, 72, 105, 17, 97, 114]", "22" ], "var": [ "array", "size" ] }, { "value": [ "[50, 67, 31, 41, 89, 90, 21, 33, 119, 0, 11, 23, 31, 64, 44, 8, 63, 15, 8, 41, 97, 7, 27, 89, 15, 34, 8, 112, 72, 21, 124, 74]", "97" ], "var": [ "array", "size" ] }, { "value": [ "[113, 51, 118, 30, 45, 74, 13, 0, 86, 29, 21, 23, 110, 83, 87, 124, 126, 84, 10, 85, 125, 46, 97, 89, 43, 47, 7, 115, 85, 46, 34, 33]", "40" ], "var": [ "array", "size" ] }, { "value": [ "[52, 91, 25, 26, 70, 62, 59, 79, 83, 25, 90, 72, 28, 114, 75, 79, 88, 76, 15, 109, 94, 4, 70, 65, 67, 23, 46, 48, 64, 36, 10, 113]", "67" ], "var": [ "array", "size" ] }, { "value": [ "[70, 92, 35, 17, 46, 7, 106, 87, 33, 85, 120, 82, 45, 23, 1, 107, 18, 77, 111, 4, 107, 115, 15, 52, 5, 100, 49, 0, 119, 41, 86, 68]", "107" ], "var": [ "array", "size" ] }, { "value": [ "[108, 21, 20, 6, 9, 111, 20, 46, 123, 0, 22, 15, 84, 110, 25, 113, 114, 32, 17, 88, 54, 50, 73, 47, 34, 50, 10, 96, 62, 26, 108, 105]", "70" ], "var": [ "array", "size" ] }, { "value": [ "[39, 36, 57, 54, 14, 17, 121, 13, 39, 114, 79, 64, 67, 26, 21, 29, 84, 91, 81, 41, 61, 18, 76, 39, 29, 8, 103, 3, 121, 64, 67, 33]", "83" ], "var": [ "array", "size" ] }, { "value": [ "[117, 103, 13, 107, 4, 42, 86, 74, 45, 12, 32, 42, 121, 0, 114, 28, 92, 118, 58, 42, 58, 103, 117, 57, 74, 90, 17, 28, 102, 94, 46, 0]", "19" ], "var": [ "array", "size" ] }, { "value": [ "[23, 104, 12, 83, 8, 34, 54, 34, 94, 9, 48, 55, 52, 84, 126, 79, 58, 70, 16, 13, 53, 87, 72, 75, 114, 63, 50, 29, 35, 16, 57, 56]", "75" ], "var": [ "array", "size" ] } ], "output": [ { "value": [ "[21, 24, 44, 51, 11, 24, 63, 10, 84, 28, 75, 45, 18, 53, 107, 33, 104, 124, 20, 47, 85, 123, 72, 105, 46, 121, 34, 101, 19, 86, 74, 8]" ], "var": [ "array" ] }, { "value": [ "[59, 28, 13, 119, 88, 122, 64, 8, 33, 36, 104, 104, 20, 115, 83, 70, 6, 122, 57, 9, 66, 102, 100, 126, 35, 54, 89, 72, 105, 17, 97, 114]" ], "var": [ "array" ] }, { "value": [ "[50, 67, 31, 41, 89, 90, 21, 33, 119, 0, 11, 23, 31, 64, 44, 8, 63, 15, 8, 41, 97, 7, 27, 89, 15, 34, 8, 112, 72, 21, 124, 74]" ], "var": [ "array" ] }, { "value": [ "[113, 51, 118, 30, 45, 74, 13, 0, 86, 29, 21, 23, 110, 83, 87, 124, 126, 84, 10, 85, 125, 46, 97, 89, 43, 47, 7, 115, 85, 46, 34, 33]" ], "var": [ "array" ] }, { "value": [ "[52, 91, 25, 26, 70, 62, 59, 79, 83, 25, 90, 72, 28, 114, 75, 79, 88, 76, 15, 109, 94, 4, 70, 65, 67, 23, 46, 48, 64, 36, 10, 113]" ], "var": [ "array" ] }, { "value": [ "[70, 92, 35, 17, 46, 7, 106, 87, 33, 85, 120, 82, 45, 23, 1, 107, 18, 77, 111, 4, 107, 115, 15, 52, 5, 100, 49, 0, 119, 41, 86, 68]" ], "var": [ "array" ] }, { "value": [ "[108, 21, 20, 6, 9, 111, 20, 46, 123, 0, 22, 15, 84, 110, 25, 113, 114, 32, 17, 88, 54, 50, 73, 47, 34, 50, 10, 96, 62, 26, 108, 105]" ], "var": [ "array" ] }, { "value": [ "[39, 36, 57, 54, 14, 17, 121, 13, 39, 114, 79, 64, 67, 26, 21, 29, 84, 91, 81, 41, 61, 18, 76, 39, 29, 8, 103, 3, 121, 64, 67, 33]" ], "var": [ "array" ] }, { "value": [ "[117, 103, 13, 107, 4, 42, 86, 74, 45, 12, 32, 42, 121, 0, 114, 28, 92, 118, 58, 42, 58, 103, 117, 57, 74, 90, 17, 28, 102, 94, 46, 0]" ], "var": [ "array" ] }, { "value": [ "[23, 104, 12, 83, 8, 34, 54, 34, 94, 9, 48, 55, 52, 84, 126, 79, 58, 70, 16, 13, 53, 87, 72, 75, 114, 63, 50, 29, 35, 16, 57, 56]" ], "var": [ "array" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_619loz8t23.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 size) { 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; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } 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]; int size = input_json["size"]; clock_t begin = clock(); arrayAbs(array, 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(array, size); }
master
null
{"livein": ["array", "size"], "liveout": ["array"], "returnvarname": [], "execcmd": "", "funname": "arrayAbs", "funargs": ["array", "size"], "typemap": {"array": "array(int32#32)", "size": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_619loz8t23.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
double test2(double a) { return __builtin_fabs(a); }
double test2(doublea)
double test2(double a)
test2
[ "double", "double" ]
{ "code": [ ".globl test2\n.type test2, @function\ntest2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t-8(%rbp), %xmm0\n\tmovq\t.LC0(%rip), %xmm1\n\tandpd\t%xmm1, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t4294967295\n", ".globl test2\n.type test2, @function\ntest2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tandps\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t4294967295\n", ".globl test2\n.type test2, @function\ntest2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tandpd\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t4294967295\n", ".global test2\n.type test2, %function\ntest2:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tldr\td0, [sp, 8]\n\tfabs\td0, d0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global test2\n.type test2, %function\ntest2:\n.LFB0:\n\t.cfi_startproc\n\tfabs\td0, d0\n\tret\n\t.cfi_endproc\n\n", ".global test2\n.type test2, %function\ntest2:\n.LFB0:\n\t.cfi_startproc\n\tfabs\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
# 1
null
{ "dummy_funcs": [ null, 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.378032747" ], "var": [ "returnv" ] }, { "value": [ "6.3298419039" ], "var": [ "returnv" ] }, { "value": [ "70.4054912151" ], "var": [ "returnv" ] }, { "value": [ "18.5967583115" ], "var": [ "returnv" ] }, { "value": [ "77.5546164885" ], "var": [ "returnv" ] }, { "value": [ "5.53437356605" ], "var": [ "returnv" ] }, { "value": [ "19.3020987243" ], "var": [ "returnv" ] }, { "value": [ "97.4985755307" ], "var": [ "returnv" ] }, { "value": [ "10.5680070837" ], "var": [ "returnv" ] }, { "value": [ "78.3997978278" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_308vjhhdb7.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = test2(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": "test2", "funargs": ["a"], "typemap": {"a": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_308vjhhdb7.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
TuringClass2016SCNU/Algorithms/multiply_and_power/c/recursive.c
int multiply(int a, int b){ if (b == 0) return 0; if (b == 1) return a; if (b % 2 == 0) return 2 * multiply(a, b/2); else return 2 * multiply(a, b/2) + a; }
int multiply(inta, intb)
int multiply(int a, int b)
multiply
[ "int", "int", "int" ]
{ "code": [ ".globl multiply\n.type multiply, @function\nmultiply:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tcmpl\t$0, -8(%rbp)\n\tjne\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tcmpl\t$1, -8(%rbp)\n\tjne\t.L4\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\n.L4:\n\tmovl\t-8(%rbp), %eax\n\tandl\t$1, %eax\n\ttestl\t%eax, %eax\n\tjne\t.L5\n\tmovl\t-8(%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, %edx\n\tmovl\t-4(%rbp), %eax\n\tmovl\t%edx, %esi\n\tmovl\t%eax, %edi\n\tcall\tmultiply\n\taddl\t%eax, %eax\n\tjmp\t.L3\n.L5:\n\tmovl\t-8(%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, %edx\n\tmovl\t-4(%rbp), %eax\n\tmovl\t%edx, %esi\n\tmovl\t%eax, %edi\n\tcall\tmultiply\n\tleal\t(%rax,%rax), %edx\n\tmovl\t-4(%rbp), %eax\n\taddl\t%edx, %eax\n.L3:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl multiply\n.type multiply, @function\nmultiply:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %eax\n\txorl\t%ecx, %ecx\n\tmovl\t$1, %esi\n\tmovl\t$2, %r8d\n.L2:\n\ttestl\t%eax, %eax\n\tje\t.L3\n\tcmpl\t$1, %eax\n\tje\t.L5\n\tmovl\t%eax, %r9d\n\tcltd\n\tandl\t$1, %r9d\n\tidivl\t%r8d\n\tleal\t(%rsi,%rsi), %edx\n\ttestl\t%r9d, %r9d\n\tjne\t.L13\n.L4:\n\tmovl\t%edx, %esi\n\tjmp\t.L2\n.L13:\n\timull\t%edi, %esi\n\taddl\t%esi, %ecx\n\tjmp\t.L4\n.L5:\n\tmovl\t%edi, %eax\n.L3:\n\timull\t%esi, %eax\n\taddl\t%ecx, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl multiply\n.type multiply, @function\nmultiply:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %eax\n\ttestl\t%esi, %esi\n\tje\t.L5\n\tcmpl\t$1, %esi\n\tje\t.L6\n\tmovl\t$1, %edx\n\txorl\t%r9d, %r9d\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L16:\n\tcmpl\t$1, %esi\n\tje\t.L15\n.L3:\n\tmovl\t%eax, %esi\n\tmovl\t%eax, %r8d\n\tmovl\t%edx, %ecx\n\taddl\t%edx, %edx\n\tshrl\t$31, %esi\n\tandl\t$1, %r8d\n\taddl\t%eax, %esi\n\tsarl\t%esi\n\tmovl\t%esi, %eax\n\ttestl\t%r8d, %r8d\n\tje\t.L4\n\timull\t%edi, %ecx\n\taddl\t%ecx, %r9d\n.L4:\n\ttestl\t%esi, %esi\n\tjne\t.L16\n.L1:\n\tmovl\t%r9d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L15:\n\timull\t%edx, %edi\n\taddl\t%edi, %r9d\n\tmovl\t%r9d, %eax\n\tret\n.L5:\n\txorl\t%r9d, %r9d\n\tjmp\t.L1\n.L6:\n\tmovl\t%edi, %r9d\n\tjmp\t.L1\n\t.cfi_endproc\n\n", ".global multiply\n.type multiply, %function\nmultiply:\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\tstr\tw1, [sp, 24]\n\tldr\tw0, [sp, 24]\n\tcmp\tw0, 0\n\tbne\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 24]\n\tcmp\tw0, 1\n\tbne\t.L4\n\tldr\tw0, [sp, 28]\n\tb\t.L3\n.L4:\n\tldr\tw0, [sp, 24]\n\tand\tw0, w0, 1\n\tcmp\tw0, 0\n\tbne\t.L5\n\tldr\tw0, [sp, 24]\n\tlsr\tw1, w0, 31\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 1\n\tmov\tw1, w0\n\tldr\tw0, [sp, 28]\n\tbl\tmultiply\n\tlsl\tw0, w0, 1\n\tb\t.L3\n.L5:\n\tldr\tw0, [sp, 24]\n\tlsr\tw1, w0, 31\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 1\n\tmov\tw1, w0\n\tldr\tw0, [sp, 28]\n\tbl\tmultiply\n\tlsl\tw1, w0, 1\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w1, w0\n.L3:\n\tldp\tx29, x30, [sp], 32\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global multiply\n.type multiply, %function\nmultiply:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw2, 1\n\tmov\tw3, 0\n\tmov\tw5, 2\n.L2:\n\tcbz\tw1, .L3\n\tcmp\tw1, 1\n\tbeq\t.L5\n\tand\tw6, w1, 1\n\tlsl\tw4, w2, 1\n\tsdiv\tw1, w1, w5\n\tcbz\tw6, .L4\n\tmadd\tw3, w0, w2, w3\n.L4:\n\tmov\tw2, w4\n\tb\t.L2\n.L5:\n\tmov\tw1, w0\n.L3:\n\tmadd\tw0, w1, w2, w3\n\tret\n\t.cfi_endproc\n\n", ".global multiply\n.type multiply, %function\nmultiply:\n.LFB23:\n\t.cfi_startproc\n\tmov\tw6, w0\n\tcbz\tw1, .L5\n\tcmp\tw1, 1\n\tbeq\t.L1\n\tmov\tw3, 1\n\tmov\tw0, 0\n\tb\t.L3\n\t.p2align 2,,3\n.L13:\n\tcmp\tw1, 1\n\tbeq\t.L15\n.L3:\n\tmadd\tw2, w6, w3, w0\n\tadd\tw4, w1, w1, lsr 31\n\tands\tw5, w1, 1\n\tlsl\tw3, w3, 1\n\tcsel\tw0, w2, w0, ne\n\tasr\tw1, w4, 1\n\tcmp\twzr, w4, asr 1\n\tbne\t.L13\n.L1:\n\tret\n\t.p2align 2,,3\n.L15:\n\tmadd\tw0, w6, w3, w0\n\tret\n.L5:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "89", "67" ], "var": [ "a", "b" ] }, { "value": [ "107", "47" ], "var": [ "a", "b" ] }, { "value": [ "19", "83" ], "var": [ "a", "b" ] }, { "value": [ "119", "34" ], "var": [ "a", "b" ] }, { "value": [ "110", "41" ], "var": [ "a", "b" ] }, { "value": [ "78", "60" ], "var": [ "a", "b" ] }, { "value": [ "93", "38" ], "var": [ "a", "b" ] }, { "value": [ "124", "48" ], "var": [ "a", "b" ] }, { "value": [ "32", "77" ], "var": [ "a", "b" ] }, { "value": [ "68", "11" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "5963" ], "var": [ "returnv" ] }, { "value": [ "5029" ], "var": [ "returnv" ] }, { "value": [ "1577" ], "var": [ "returnv" ] }, { "value": [ "4046" ], "var": [ "returnv" ] }, { "value": [ "4510" ], "var": [ "returnv" ] }, { "value": [ "4680" ], "var": [ "returnv" ] }, { "value": [ "3534" ], "var": [ "returnv" ] }, { "value": [ "5952" ], "var": [ "returnv" ] }, { "value": [ "2464" ], "var": [ "returnv" ] }, { "value": [ "748" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_54ao9i5frq.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = multiply(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": "multiply", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_54ao9i5frq.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
shubhamchaudhary/uiet/c/advanced/hashTable.c
unsigned int hash(char *s){ unsigned int h=0; for(;*s;s++) h=*s+h*31; return h%101; }
unsigned int hash(char *s)
unsigned int hash(char *s)
hash
[ "unsigned int", "char *" ]
{ "code": [ ".globl hash\n.type hash, @function\nhash:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.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 hash\n.type hash, @function\nhash:\n.LFB35:\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 hash\n.type hash, @function\nhash:\n.LFB50:\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 hash\n.type hash, %function\nhash:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.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 hash\n.type hash, %function\nhash:\n.LFB35:\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 hash\n.type hash, %function\nhash:\n.LFB50:\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
#include <string.h> #include <stdio.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"mhxsq\"" ], "var": [ "s" ] }, { "value": [ "\"slzct\"" ], "var": [ "s" ] }, { "value": [ "\"djyuoo\"" ], "var": [ "s" ] }, { "value": [ "\"nduzj\"" ], "var": [ "s" ] }, { "value": [ "\"xkdiuqgp\"" ], "var": [ "s" ] }, { "value": [ "\"tvasotokrtoocyvkxjcdm\"" ], "var": [ "s" ] }, { "value": [ "\"exckqyleskabe\"" ], "var": [ "s" ] }, { "value": [ "\"ighbeefdzcgfbfiigjynbfncocc\"" ], "var": [ "s" ] }, { "value": [ "\"xjnabhozswfbijpwvnl\"" ], "var": [ "s" ] }, { "value": [ "\"cpcs\"" ], "var": [ "s" ] } ], "output": [ { "value": [ "26", "\"mhxsq\"" ], "var": [ "returnv", "s" ] }, { "value": [ "89", "\"slzct\"" ], "var": [ "returnv", "s" ] }, { "value": [ "54", "\"djyuoo\"" ], "var": [ "returnv", "s" ] }, { "value": [ "73", "\"nduzj\"" ], "var": [ "returnv", "s" ] }, { "value": [ "12", "\"xkdiuqgp\"" ], "var": [ "returnv", "s" ] }, { "value": [ "0", "\"tvasotokrtoocyvkxjcdm\"" ], "var": [ "returnv", "s" ] }, { "value": [ "8", "\"exckqyleskabe\"" ], "var": [ "returnv", "s" ] }, { "value": [ "13", "\"ighbeefdzcgfbfiigjynbfncocc\"" ], "var": [ "returnv", "s" ] }, { "value": [ "31", "\"xjnabhozswfbijpwvnl\"" ], "var": [ "returnv", "s" ] }, { "value": [ "27", "\"cpcs\"" ], "var": [ "returnv", "s" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_42xd_d5_le.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = hash(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": "hash", "funargs": ["s"], "typemap": {"s": "string", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42xd_d5_le.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
mtirado/eslib/eslib_string.c
int eslib_string_is_sane(char *buf, const unsigned int len) { unsigned int idx; if (len == 0) return -1; for (idx = 0; idx < len; ++idx) { char c = buf[idx]; if (c < 32 || c >= 127) { if (!( c == ' ' || c == '\n' || c == '\t' )) { return 0; } } } return 1; }
int eslib_string_is_sane(char *buf, const unsigned intlen)
int eslib_string_is_sane(char *buf, const unsigned int len)
eslib_string_is_sane
[ "int", "char *", "const unsigned int" ]
{ "code": [ ".globl eslib_string_is_sane\n.type eslib_string_is_sane, @function\neslib_string_is_sane:\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\tcmpl\t$0, -28(%rbp)\n\tjne\t.L2\n\tmovl\t$-1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L4\n.L7:\n\tmovl\t-4(%rbp), %edx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tmovb\t%al, -5(%rbp)\n\tcmpb\t$31, -5(%rbp)\n\tjle\t.L5\n\tcmpb\t$127, -5(%rbp)\n\tjne\t.L6\n.L5:\n\tcmpb\t$32, -5(%rbp)\n\tje\t.L6\n\tcmpb\t$10, -5(%rbp)\n\tje\t.L6\n\tcmpb\t$9, -5(%rbp)\n\tje\t.L6\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L6:\n\taddl\t$1, -4(%rbp)\n.L4:\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-28(%rbp), %eax\n\tjb\t.L7\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 eslib_string_is_sane\n.type eslib_string_is_sane, @function\neslib_string_is_sane:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\torl\t$-1, %eax\n\ttestl\t%esi, %esi\n\tje\t.L1\n\txorl\t%eax, %eax\n.L3:\n\tcmpl\t%eax, %esi\n\tjbe\t.L12\n\tmovb\t(%rdi,%rax), %dl\n\tincq\t%rax\n\tleal\t-32(%rdx), %ecx\n\tcmpb\t$94, %cl\n\tjbe\t.L3\n\tsubl\t$9, %edx\n\tcmpb\t$1, %dl\n\tjbe\t.L3\n\txorl\t%eax, %eax\n\tjmp\t.L1\n.L12:\n\tmovl\t$1, %eax\n\tret\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl eslib_string_is_sane\n.type eslib_string_is_sane, @function\neslib_string_is_sane:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$-1, %eax\n\ttestl\t%esi, %esi\n\tje\t.L1\n\tleal\t-1(%rsi), %eax\n\tleaq\t1(%rdi,%rax), %rcx\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovzbl\t(%rdi), %eax\n\tleal\t-32(%rax), %edx\n\tcmpb\t$94, %dl\n\tjbe\t.L7\n\tsubl\t$9, %eax\n\tcmpb\t$1, %al\n\tja\t.L6\n.L7:\n\taddq\t$1, %rdi\n\tcmpq\t%rdi, %rcx\n\tjne\t.L4\n\tmovl\t$1, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\txorl\t%eax, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global eslib_string_is_sane\n.type eslib_string_is_sane, %function\neslib_string_is_sane:\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\tldr\tw0, [sp, 4]\n\tcmp\tw0, 0\n\tbne\t.L2\n\tmov\tw0, -1\n\tb\t.L3\n.L2:\n\tstr\twzr, [sp, 28]\n\tb\t.L4\n.L7:\n\tldr\tw0, [sp, 28]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tstrb\tw0, [sp, 27]\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 31\n\tbls\t.L5\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 126\n\tbls\t.L6\n.L5:\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 32\n\tbeq\t.L6\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 10\n\tbeq\t.L6\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 9\n\tbeq\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.L4:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 4]\n\tcmp\tw1, w0\n\tbcc\t.L7\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 eslib_string_is_sane\n.type eslib_string_is_sane, %function\neslib_string_is_sane:\n.LFB35:\n\t.cfi_startproc\n\tcbz\tw1, .L6\n\tmov\tx3, 0\n.L3:\n\tcmp\tw1, w3\n\tbhi\t.L5\n\tmov\tw0, 1\n.L1:\n\tret\n.L5:\n\tldrb\tw2, [x0, x3]\n\tsub\tw4, w2, #32\n\tand\tw4, w4, 255\n\tcmp\tw4, 94\n\tbls\t.L4\n\tsub\tw2, w2, #9\n\tand\tw2, w2, 255\n\tcmp\tw2, 1\n\tbhi\t.L7\n.L4:\n\tadd\tx3, x3, 1\n\tb\t.L3\n.L6:\n\tmov\tw0, -1\n\tb\t.L1\n.L7:\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global eslib_string_is_sane\n.type eslib_string_is_sane, %function\neslib_string_is_sane:\n.LFB50:\n\t.cfi_startproc\n\tcbz\tw1, .L4\n\tsub\tw1, w1, #1\n\tadd\tx3, x0, 1\n\tadd\tx3, x3, x1\n\t.p2align 3,,7\n.L3:\n\tldrb\tw1, [x0]\n\tadd\tx0, x0, 1\n\tsub\tw2, w1, #32\n\tsub\tw1, w1, #9\n\tand\tw2, w2, 255\n\tand\tw1, w1, 255\n\tcmp\tw2, 94\n\tccmp\tw1, 1, 0, hi\n\tbhi\t.L5\n\tcmp\tx3, x0\n\tbne\t.L3\n\tmov\tw0, 1\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, -1\n\tret\n\t.p2align 2,,3\n.L5:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <errno.h> #include <stddef.h> #include <limits.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"czv\"", "368" ], "var": [ "buf", "len" ] }, { "value": [ "\"\"", "971" ], "var": [ "buf", "len" ] }, { "value": [ "\"nprdrrgvlswywicrzqvpqrgmwwselhh\"", "89" ], "var": [ "buf", "len" ] }, { "value": [ "\"zustkxsktdytsrsvrqu\"", "446" ], "var": [ "buf", "len" ] }, { "value": [ "\"jcgbfuvpxawmdhlimhknmfku\"", "882" ], "var": [ "buf", "len" ] }, { "value": [ "\"beybeaemzxxepibwkd\"", "622" ], "var": [ "buf", "len" ] }, { "value": [ "\"hquvwlhqnvodnlhglcbqok\"", "341" ], "var": [ "buf", "len" ] }, { "value": [ "\"jzlxhiyzneoqyavqtpqgbnbxdrwgj\"", "933" ], "var": [ "buf", "len" ] }, { "value": [ "\"zikyxlttixajouwuzdgego\"", "547" ], "var": [ "buf", "len" ] }, { "value": [ "\"urjztqvxkynwpqcwppbpcqmyzbsuj\"", "378" ], "var": [ "buf", "len" ] } ], "output": [ { "value": [ "\"czv\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"nprdrrgvlswywicrzqvpqrgmwwselhh\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"zustkxsktdytsrsvrqu\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"jcgbfuvpxawmdhlimhknmfku\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"beybeaemzxxepibwkd\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"hquvwlhqnvodnlhglcbqok\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"jzlxhiyzneoqyavqtpqgbnbxdrwgj\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"zikyxlttixajouwuzdgego\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"urjztqvxkynwpqcwppbpcqmyzbsuj\"", "0" ], "var": [ "buf", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_55rc90uos8.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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, unsigned int len, 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()); unsigned int len = input_json["len"]; clock_t begin = clock(); int returnv = eslib_string_is_sane(buf, len); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(buf, len, returnv); }
master
null
{"livein": ["buf", "len"], "liveout": ["buf"], "returnvarname": ["returnv"], "execcmd": "", "funname": "eslib_string_is_sane", "funargs": ["buf", "len"], "typemap": {"buf": "string", "len": "uint32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55rc90uos8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
bri-a/C-Lite-Compiler/CS480_pcc_alco8653/test_SA3_7.c
int foo() { return 12;}
int foo()
int foo()
foo
[ "int", "" ]
{ "code": [ ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$12, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$12, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$12, %eax\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 12\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 12\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 12\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "12" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_300f1ngeo7.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = foo(); clock_t end = 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": "foo", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_300f1ngeo7.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Enchak/c-programming-homework/B/02/17/02_BiggestOf3Numbers.c
float biggest(float a, float b, float c) { if(a > b && a > c) { return a; } if(b > a && b > c) { return b; } return c; }
float biggest(floata, floatb, floatc)
float biggest(float a, float b, float c)
biggest
[ "float", "float", "float", "float" ]
{ "code": [ ".globl biggest\n.type biggest, @function\nbiggest:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovss\t%xmm0, -4(%rbp)\n\tmovss\t%xmm1, -8(%rbp)\n\tmovss\t%xmm2, -12(%rbp)\n\tmovss\t-4(%rbp), %xmm0\n\tcomiss\t-8(%rbp), %xmm0\n\tjbe\t.L2\n\tmovss\t-4(%rbp), %xmm0\n\tcomiss\t-12(%rbp), %xmm0\n\tjbe\t.L2\n\tmovss\t-4(%rbp), %xmm0\n\tjmp\t.L5\n.L2:\n\tmovss\t-8(%rbp), %xmm0\n\tcomiss\t-4(%rbp), %xmm0\n\tjbe\t.L6\n\tmovss\t-8(%rbp), %xmm0\n\tcomiss\t-12(%rbp), %xmm0\n\tjbe\t.L6\n\tmovss\t-8(%rbp), %xmm0\n\tjmp\t.L5\n.L6:\n\tmovss\t-12(%rbp), %xmm0\n.L5:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl biggest\n.type biggest, @function\nbiggest:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovaps\t%xmm0, %xmm3\n\tmovaps\t%xmm2, %xmm0\n\tcomiss\t%xmm1, %xmm3\n\tjbe\t.L2\n\tcomiss\t%xmm2, %xmm3\n\tja\t.L7\n.L2:\n\tcomiss\t%xmm3, %xmm1\n\tjbe\t.L4\n\tmaxss\t%xmm0, %xmm1\n\tmovaps\t%xmm1, %xmm0\n\tret\n.L7:\n\tmovaps\t%xmm3, %xmm0\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".globl biggest\n.type biggest, @function\nbiggest:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovaps\t%xmm0, %xmm3\n\tmovaps\t%xmm2, %xmm0\n\tcomiss\t%xmm1, %xmm3\n\tjbe\t.L2\n\tcomiss\t%xmm2, %xmm3\n\tja\t.L7\n.L2:\n\tcomiss\t%xmm3, %xmm1\n\tjbe\t.L4\n\tmaxss\t%xmm0, %xmm1\n\tmovaps\t%xmm1, %xmm0\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tmovaps\t%xmm3, %xmm0\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".global biggest\n.type biggest, %function\nbiggest:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\ts0, [sp, 12]\n\tstr\ts1, [sp, 8]\n\tstr\ts2, [sp, 4]\n\tldr\ts1, [sp, 12]\n\tldr\ts0, [sp, 8]\n\tfcmpe\ts1, s0\n\tble\t.L2\n\tldr\ts1, [sp, 12]\n\tldr\ts0, [sp, 4]\n\tfcmpe\ts1, s0\n\tble\t.L2\n\tldr\ts0, [sp, 12]\n\tb\t.L5\n.L2:\n\tldr\ts1, [sp, 8]\n\tldr\ts0, [sp, 12]\n\tfcmpe\ts1, s0\n\tble\t.L6\n\tldr\ts1, [sp, 8]\n\tldr\ts0, [sp, 4]\n\tfcmpe\ts1, s0\n\tble\t.L6\n\tldr\ts0, [sp, 8]\n\tb\t.L5\n.L6:\n\tldr\ts0, [sp, 4]\n.L5:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global biggest\n.type biggest, %function\nbiggest:\n.LFB13:\n\t.cfi_startproc\n\tfmov\ts3, s0\n\tfmov\ts0, s2\n\tfcmpe\ts3, s1\n\tble\t.L2\n\tfcmpe\ts3, s2\n\tbgt\t.L7\n.L2:\n\tfcmpe\ts3, s1\n\tbpl\t.L4\n\tfcmp\ts1, s0\n\tfcsel\ts0, s0, s1, le\n.L4:\n\tret\n.L7:\n\tfmov\ts0, s3\n\tb\t.L4\n\t.cfi_endproc\n\n", ".global biggest\n.type biggest, %function\nbiggest:\n.LFB23:\n\t.cfi_startproc\n\tfmov\ts3, s0\n\tfmov\ts0, s2\n\tfcmpe\ts3, s1\n\tble\t.L2\n\tfcmpe\ts3, s2\n\tbgt\t.L7\n.L2:\n\tfcmpe\ts3, s1\n\tbpl\t.L4\n\tfcmp\ts1, s0\n\tfcsel\ts0, s0, s1, le\n.L4:\n\tret\n\t.p2align 2,,3\n.L7:\n\tfmov\ts0, s3\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "42.0302380499", "34.8984768808", "23.4990104907" ], "var": [ "a", "b", "c" ] }, { "value": [ "29.9207042512", "30.0329056923", "23.3708843967" ], "var": [ "a", "b", "c" ] }, { "value": [ "47.8837689467", "94.4068964395", "81.7099925712" ], "var": [ "a", "b", "c" ] }, { "value": [ "57.8402352009", "58.9648929721", "60.8183514729" ], "var": [ "a", "b", "c" ] }, { "value": [ "10.142361976", "47.1786922031", "50.5498368089" ], "var": [ "a", "b", "c" ] }, { "value": [ "51.3579194885", "40.2900742597", "0.69488841727" ], "var": [ "a", "b", "c" ] }, { "value": [ "90.8919965699", "56.4144412957", "90.0827105929" ], "var": [ "a", "b", "c" ] }, { "value": [ "40.0136438276", "36.2757645338", "92.9876810074" ], "var": [ "a", "b", "c" ] }, { "value": [ "29.024702256", "60.6915007842", "36.9400118074" ], "var": [ "a", "b", "c" ] }, { "value": [ "31.1865040231", "26.6467275512", "41.7788224401" ], "var": [ "a", "b", "c" ] } ], "output": [ { "value": [ "42.03023910522461" ], "var": [ "returnv" ] }, { "value": [ "30.03290557861328" ], "var": [ "returnv" ] }, { "value": [ "94.40689849853516" ], "var": [ "returnv" ] }, { "value": [ "60.81835174560547" ], "var": [ "returnv" ] }, { "value": [ "50.549835205078125" ], "var": [ "returnv" ] }, { "value": [ "51.35791778564453" ], "var": [ "returnv" ] }, { "value": [ "90.89199829101562" ], "var": [ "returnv" ] }, { "value": [ "92.98767852783203" ], "var": [ "returnv" ] }, { "value": [ "60.69150161743164" ], "var": [ "returnv" ] }, { "value": [ "41.77882385253906" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_55fs_wjn8n.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 b, float c, 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"]; float b = input_json["b"]; float c = input_json["c"]; clock_t begin = clock(); float returnv = biggest(a, b, c); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, c, returnv); }
master
null
{"livein": ["a", "b", "c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "biggest", "funargs": ["a", "b", "c"], "typemap": {"a": "float32", "b": "float32", "c": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55fs_wjn8n.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
fbbs/fdubbs/util/local_utl/statBM.c
int step(int steps){ }
int step(intsteps)
int step(int steps)
step
[ "int", "int" ]
{ "code": [ ".globl step\n.type step, @function\nstep:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl step\n.type step, @function\nstep:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl step\n.type step, @function\nstep:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global step\n.type step, %function\nstep:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tnop\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global step\n.type step, %function\nstep:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global step\n.type step, %function\nstep:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "23" ], "var": [ "steps" ] }, { "value": [ "116" ], "var": [ "steps" ] }, { "value": [ "1" ], "var": [ "steps" ] }, { "value": [ "6" ], "var": [ "steps" ] }, { "value": [ "52" ], "var": [ "steps" ] }, { "value": [ "43" ], "var": [ "steps" ] }, { "value": [ "24" ], "var": [ "steps" ] }, { "value": [ "60" ], "var": [ "steps" ] }, { "value": [ "70" ], "var": [ "steps" ] }, { "value": [ "98" ], "var": [ "steps" ] } ], "output": [ { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "116" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "6" ], "var": [ "returnv" ] }, { "value": [ "52" ], "var": [ "returnv" ] }, { "value": [ "43" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "60" ], "var": [ "returnv" ] }, { "value": [ "70" ], "var": [ "returnv" ] }, { "value": [ "98" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_383u3fok28.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 steps, 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 steps = input_json["steps"]; clock_t begin = clock(); int returnv = step(steps); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(steps, returnv); }
master
null
{"livein": ["steps"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "step", "funargs": ["steps"], "typemap": {"steps": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_383u3fok28.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/c-c++-common/rotate-3.c
unsigned short int f37 (unsigned short int x, int y) { return (x >> y) | (x << (8 * 2 - y)); }
unsigned short f37(unsigned shortx, inty)
unsigned short int f37 (unsigned short int x, int y)
f37
[ "unsigned short", "unsigned short", "int" ]
{ "code": [ ".globl f37\n.type f37, @function\nf37:\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\tmovl\t%esi, -8(%rbp)\n\tmovw\t%ax, -4(%rbp)\n\tmovzwl\t-4(%rbp), %edx\n\tmovl\t-8(%rbp), %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), %edx\n\tmovl\t$16, %eax\n\tsubl\t-8(%rbp), %eax\n\tmovl\t%eax, %ecx\n\tsall\t%cl, %edx\n\tmovl\t%edx, %eax\n\torl\t%esi, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f37\n.type f37, @function\nf37:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %ecx\n\trorw\t%cl, %ax\n\tret\n\t.cfi_endproc\n\n", ".globl f37\n.type f37, @function\nf37:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %ecx\n\trorw\t%cl, %ax\n\tret\n\t.cfi_endproc\n\n", ".global f37\n.type f37, %function\nf37:\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\tw1, [sp, 8]\n\tldrh\tw1, [sp, 14]\n\tldr\tw0, [sp, 8]\n\tasr\tw0, w1, w0\n\tsxth\tw1, w0\n\tldrh\tw2, [sp, 14]\n\tmov\tw3, 16\n\tldr\tw0, [sp, 8]\n\tsub\tw0, w3, w0\n\tlsl\tw0, w2, w0\n\tsxth\tw0, w0\n\torr\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 f37\n.type f37, %function\nf37:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 65535\n\tlsr\tw2, w0, w1\n\tneg\tw1, w1\n\tand\tw1, w1, 15\n\tlsl\tw0, w0, w1\n\torr\tw0, w2, w0\n\tret\n\t.cfi_endproc\n\n", ".global f37\n.type f37, %function\nf37:\n.LFB0:\n\t.cfi_startproc\n\tneg\tw2, w1\n\tand\tw0, w0, 65535\n\tand\tw2, w2, 15\n\tlsr\tw1, w0, w1\n\tlsl\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": [ "937", "55" ], "var": [ "x", "y" ] }, { "value": [ "868", "52" ], "var": [ "x", "y" ] }, { "value": [ "800", "30" ], "var": [ "x", "y" ] }, { "value": [ "136", "94" ], "var": [ "x", "y" ] }, { "value": [ "15", "85" ], "var": [ "x", "y" ] }, { "value": [ "277", "55" ], "var": [ "x", "y" ] }, { "value": [ "526", "27" ], "var": [ "x", "y" ] }, { "value": [ "277", "32" ], "var": [ "x", "y" ] }, { "value": [ "846", "5" ], "var": [ "x", "y" ] }, { "value": [ "56", "66" ], "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": [ "277" ], "var": [ "returnv" ] }, { "value": [ "28698" ], "var": [ "returnv" ] }, { "value": [ "14" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_46f7trqysf.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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, 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"]; int y = input_json["y"]; clock_t begin = clock(); unsigned short returnv = f37(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": "f37", "funargs": ["x", "y"], "typemap": {"x": "uint16", "y": "int32", "returnv": "uint16"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_46f7trqysf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
hnal/ex30/ex30.c
int rodrigo(int a) { return a+6; }
int rodrigo(inta)
int rodrigo(int a)
rodrigo
[ "int", "int" ]
{ "code": [ ".globl rodrigo\n.type rodrigo, @function\nrodrigo:\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$6, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl rodrigo\n.type rodrigo, @function\nrodrigo:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t6(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl rodrigo\n.type rodrigo, @function\nrodrigo:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t6(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global rodrigo\n.type rodrigo, %function\nrodrigo:\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, 6\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global rodrigo\n.type rodrigo, %function\nrodrigo:\n.LFB13:\n\t.cfi_startproc\n\tadd\tw0, w0, 6\n\tret\n\t.cfi_endproc\n\n", ".global rodrigo\n.type rodrigo, %function\nrodrigo:\n.LFB23:\n\t.cfi_startproc\n\tadd\tw0, w0, 6\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "42" ], "var": [ "a" ] }, { "value": [ "97" ], "var": [ "a" ] }, { "value": [ "121" ], "var": [ "a" ] }, { "value": [ "102" ], "var": [ "a" ] }, { "value": [ "91" ], "var": [ "a" ] }, { "value": [ "42" ], "var": [ "a" ] }, { "value": [ "23" ], "var": [ "a" ] }, { "value": [ "52" ], "var": [ "a" ] }, { "value": [ "11" ], "var": [ "a" ] }, { "value": [ "63" ], "var": [ "a" ] } ], "output": [ { "value": [ "48" ], "var": [ "returnv" ] }, { "value": [ "103" ], "var": [ "returnv" ] }, { "value": [ "127" ], "var": [ "returnv" ] }, { "value": [ "108" ], "var": [ "returnv" ] }, { "value": [ "97" ], "var": [ "returnv" ] }, { "value": [ "48" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] }, { "value": [ "58" ], "var": [ "returnv" ] }, { "value": [ "17" ], "var": [ "returnv" ] }, { "value": [ "69" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_45u2ci2dtf.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = rodrigo(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": "rodrigo", "funargs": ["a"], "typemap": {"a": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45u2ci2dtf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
htmk/Fat-Array/src/test.c
int fchar_cmp(const char a, const char b) { return (int)a - (int)b; }
int fchar_cmp(const chara, const charb)
int fchar_cmp(const char a, const char b)
fchar_cmp
[ "int", "const char", "const char" ]
{ "code": [ ".globl fchar_cmp\n.type fchar_cmp, @function\nfchar_cmp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %edx\n\tmovl\t%esi, %eax\n\tmovb\t%dl, -4(%rbp)\n\tmovb\t%al, -8(%rbp)\n\tmovsbl\t-4(%rbp), %edx\n\tmovsbl\t-8(%rbp), %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 fchar_cmp\n.type fchar_cmp, @function\nfchar_cmp:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tmovsbl\t%dil, %eax\n\tmovsbl\t%sil, %esi\n\tsubl\t%esi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl fchar_cmp\n.type fchar_cmp, @function\nfchar_cmp:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tmovsbl\t%dil, %eax\n\tmovsbl\t%sil, %esi\n\tsubl\t%esi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global fchar_cmp\n.type fchar_cmp, %function\nfchar_cmp:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tstrb\tw1, [sp, 14]\n\tldrb\tw1, [sp, 15]\n\tldrb\tw0, [sp, 14]\n\tsub\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fchar_cmp\n.type fchar_cmp, %function\nfchar_cmp:\n.LFB11:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, w1, uxtb\n\tret\n\t.cfi_endproc\n\n", ".global fchar_cmp\n.type fchar_cmp, %function\nfchar_cmp:\n.LFB11:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, w1, uxtb\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "2", "95" ], "var": [ "a", "b" ] }, { "value": [ "23", "46" ], "var": [ "a", "b" ] }, { "value": [ "58", "36" ], "var": [ "a", "b" ] }, { "value": [ "117", "40" ], "var": [ "a", "b" ] }, { "value": [ "72", "72" ], "var": [ "a", "b" ] }, { "value": [ "12", "123" ], "var": [ "a", "b" ] }, { "value": [ "100", "78" ], "var": [ "a", "b" ] }, { "value": [ "96", "16" ], "var": [ "a", "b" ] }, { "value": [ "104", "110" ], "var": [ "a", "b" ] }, { "value": [ "117", "103" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "-93" ], "var": [ "returnv" ] }, { "value": [ "-23" ], "var": [ "returnv" ] }, { "value": [ "22" ], "var": [ "returnv" ] }, { "value": [ "77" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "-111" ], "var": [ "returnv" ] }, { "value": [ "22" ], "var": [ "returnv" ] }, { "value": [ "80" ], "var": [ "returnv" ] }, { "value": [ "-6" ], "var": [ "returnv" ] }, { "value": [ "14" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_648xigf_9m.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 a, char b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char a = input_json["a"].get<char>(); char b = input_json["b"].get<char>(); clock_t begin = clock(); int returnv = fchar_cmp(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "fchar_cmp", "funargs": ["a", "b"], "typemap": {"a": "int8", "b": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_648xigf_9m.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Mustaavalkosta/toolchain_gcc-4.9/gcc/testsuite/gcc.target/sh/pr55303-2.c
int test_01 (int a) { return a <= 0 ? a : 0; }
int test_01(inta)
int test_01 (int a)
test_01
[ "int", "int" ]
{ "code": [ ".globl test_01\n.type test_01, @function\ntest_01:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t$0, %eax\n\tcmpl\t$0, -4(%rbp)\n\tcmovle\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_01\n.type test_01, @function\ntest_01:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tmovl\t$0, %eax\n\tcmovle\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl test_01\n.type test_01, @function\ntest_01:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tmovl\t$0, %eax\n\tcmovle\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global test_01\n.type test_01, %function\ntest_01:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tmov\tw2, 0\n\tcmp\tw1, 0\n\tcsel\tw0, w0, w2, le\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global test_01\n.type test_01, %function\ntest_01:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcsel\tw0, w0, wzr, le\n\tret\n\t.cfi_endproc\n\n", ".global test_01\n.type test_01, %function\ntest_01:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcsel\tw0, w0, wzr, 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": [ "37" ], "var": [ "a" ] }, { "value": [ "106" ], "var": [ "a" ] }, { "value": [ "50" ], "var": [ "a" ] }, { "value": [ "124" ], "var": [ "a" ] }, { "value": [ "75" ], "var": [ "a" ] }, { "value": [ "46" ], "var": [ "a" ] }, { "value": [ "52" ], "var": [ "a" ] }, { "value": [ "10" ], "var": [ "a" ] }, { "value": [ "42" ], "var": [ "a" ] }, { "value": [ "65" ], "var": [ "a" ] } ], "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_46zum_5gqh.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = test_01(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": "test_01", "funargs": ["a"], "typemap": {"a": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_46zum_5gqh.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ieugen/ipc/scaner.c
int isoperator (char c) { return ( c==','|| c=='|' || c=='6'|| c=='^' || c=='='|| c== '!'|| c=='<' || c== '>' || c== '+' || c== '-' || c=='%' || c=='/' || c=='*' || c== '~' || c=='(' || c==')' || c=='[' || c== ']' || c=='.' || ';' || c=='\'' || c=='"'); }
int isoperator(charc)
int isoperator (char c)
isoperator
[ "int", "char" ]
{ "code": [ ".globl isoperator\n.type isoperator, @function\nisoperator:\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\tmovl\t$1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl isoperator\n.type isoperator, @function\nisoperator:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl isoperator\n.type isoperator, @function\nisoperator:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global isoperator\n.type isoperator, %function\nisoperator:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\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 isoperator\n.type isoperator, %function\nisoperator:\n.LFB35:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global isoperator\n.type isoperator, %function\nisoperator:\n.LFB52:\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 <stdlib.h> #include <string.h> #include <ctype.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "39" ], "var": [ "c" ] }, { "value": [ "118" ], "var": [ "c" ] }, { "value": [ "54" ], "var": [ "c" ] }, { "value": [ "27" ], "var": [ "c" ] }, { "value": [ "73" ], "var": [ "c" ] }, { "value": [ "37" ], "var": [ "c" ] }, { "value": [ "33" ], "var": [ "c" ] }, { "value": [ "111" ], "var": [ "c" ] }, { "value": [ "25" ], "var": [ "c" ] }, { "value": [ "12" ], "var": [ "c" ] } ], "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_50sgdt_l9n.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = isoperator(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": "isoperator", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_50sgdt_l9n.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
jasonleaster/Pointer-On-C/Chapter thirteen/Chapter thirteen exercise 2.c
int add(int number) { number++; return number; }
int add(intnumber)
int add(int number)
add
[ "int", "int" ]
{ "code": [ ".globl add\n.type add, @function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\taddl\t$1, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl add\n.type add, @function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl add\n.type add, @function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global add\n.type add, %function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global add\n.type add, %function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, 1\n\tret\n\t.cfi_endproc\n\n", ".global add\n.type add, %function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, 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": [ "81" ], "var": [ "number" ] }, { "value": [ "111" ], "var": [ "number" ] }, { "value": [ "61" ], "var": [ "number" ] }, { "value": [ "99" ], "var": [ "number" ] }, { "value": [ "74" ], "var": [ "number" ] }, { "value": [ "123" ], "var": [ "number" ] }, { "value": [ "7" ], "var": [ "number" ] }, { "value": [ "21" ], "var": [ "number" ] }, { "value": [ "73" ], "var": [ "number" ] }, { "value": [ "48" ], "var": [ "number" ] } ], "output": [ { "value": [ "82" ], "var": [ "returnv" ] }, { "value": [ "112" ], "var": [ "returnv" ] }, { "value": [ "62" ], "var": [ "returnv" ] }, { "value": [ "100" ], "var": [ "returnv" ] }, { "value": [ "75" ], "var": [ "returnv" ] }, { "value": [ "124" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "22" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "49" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_42ktp5124c.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 number, 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 number = input_json["number"]; clock_t begin = clock(); int returnv = add(number); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(number, returnv); }
master
null
{"livein": ["number"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "add", "funargs": ["number"], "typemap": {"number": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42ktp5124c.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
coder-guy22296/42-Fract-ol/libft/ft_isdigit.c
int ft_isdigit(int c) { if (c >= '0' && c <= '9') { return (1); } return (0); }
int ft_isdigit(intc)
int ft_isdigit(int c)
ft_isdigit
[ "int", "int" ]
{ "code": [ ".globl ft_isdigit\n.type ft_isdigit, @function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$47, -4(%rbp)\n\tjle\t.L2\n\tcmpl\t$57, -4(%rbp)\n\tjg\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ft_isdigit\n.type ft_isdigit, @function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$48, %edi\n\txorl\t%eax, %eax\n\tcmpl\t$9, %edi\n\tsetbe\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl ft_isdigit\n.type ft_isdigit, @function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$48, %edi\n\txorl\t%eax, %eax\n\tcmpl\t$9, %edi\n\tsetbe\t%al\n\tret\n\t.cfi_endproc\n\n", ".global ft_isdigit\n.type ft_isdigit, %function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 47\n\tble\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 57\n\tbgt\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ft_isdigit\n.type ft_isdigit, %function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #48\n\tcmp\tw0, 9\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n", ".global ft_isdigit\n.type ft_isdigit, %function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #48\n\tcmp\tw0, 9\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, 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": [ "c" ] }, { "value": [ "109" ], "var": [ "c" ] }, { "value": [ "105" ], "var": [ "c" ] }, { "value": [ "92" ], "var": [ "c" ] }, { "value": [ "80" ], "var": [ "c" ] }, { "value": [ "16" ], "var": [ "c" ] }, { "value": [ "85" ], "var": [ "c" ] }, { "value": [ "24" ], "var": [ "c" ] }, { "value": [ "109" ], "var": [ "c" ] }, { "value": [ "106" ], "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_319m4t4zk3.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int c, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int c = input_json["c"]; clock_t begin = clock(); int returnv = ft_isdigit(c); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(c, returnv); }
master
null
{"livein": ["c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "ft_isdigit", "funargs": ["c"], "typemap": {"c": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_319m4t4zk3.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
everskar2013/PentiumX/Software/PentiumX/syscall/syscall.c
unsigned int Multiply(unsigned int a, unsigned int b) { unsigned int i; unsigned int result = 0; for (i=0; i<b; i++) { result += a; } return result; }
unsigned int Multiply(unsigned inta, unsigned intb)
unsigned int Multiply(unsigned int a, unsigned int b)
Multiply
[ "unsigned int", "unsigned int", "unsigned int" ]
{ "code": [ ".globl Multiply\n.type Multiply, @function\nMultiply:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tmovl\t$0, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-20(%rbp), %eax\n\taddl\t%eax, -4(%rbp)\n\taddl\t$1, -8(%rbp)\n.L2:\n\tmovl\t-8(%rbp), %eax\n\tcmpl\t-24(%rbp), %eax\n\tjb\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 Multiply\n.type Multiply, @function\nMultiply:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %eax\n\timull\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl Multiply\n.type Multiply, @function\nMultiply:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %eax\n\timull\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global Multiply\n.type Multiply, %function\nMultiply:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tstr\twzr, [sp, 28]\n\tstr\twzr, [sp, 24]\n\tb\t.L2\n.L3:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 12]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 24]\n.L2:\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 8]\n\tcmp\tw1, w0\n\tbcc\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 Multiply\n.type Multiply, %function\nMultiply:\n.LFB0:\n\t.cfi_startproc\n\tmul\tw0, w1, w0\n\tret\n\t.cfi_endproc\n\n", ".global Multiply\n.type Multiply, %function\nMultiply:\n.LFB0:\n\t.cfi_startproc\n\tmul\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": [ "700", "369" ], "var": [ "a", "b" ] }, { "value": [ "545", "332" ], "var": [ "a", "b" ] }, { "value": [ "754", "115" ], "var": [ "a", "b" ] }, { "value": [ "447", "193" ], "var": [ "a", "b" ] }, { "value": [ "231", "626" ], "var": [ "a", "b" ] }, { "value": [ "382", "322" ], "var": [ "a", "b" ] }, { "value": [ "579", "815" ], "var": [ "a", "b" ] }, { "value": [ "609", "745" ], "var": [ "a", "b" ] }, { "value": [ "282", "366" ], "var": [ "a", "b" ] }, { "value": [ "616", "538" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "258300" ], "var": [ "returnv" ] }, { "value": [ "180940" ], "var": [ "returnv" ] }, { "value": [ "86710" ], "var": [ "returnv" ] }, { "value": [ "86271" ], "var": [ "returnv" ] }, { "value": [ "144606" ], "var": [ "returnv" ] }, { "value": [ "123004" ], "var": [ "returnv" ] }, { "value": [ "471885" ], "var": [ "returnv" ] }, { "value": [ "453705" ], "var": [ "returnv" ] }, { "value": [ "103212" ], "var": [ "returnv" ] }, { "value": [ "331408" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_488t354s92.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 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"]; clock_t begin = clock(); unsigned int returnv = Multiply(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": "Multiply", "funargs": ["a", "b"], "typemap": {"a": "uint32", "b": "uint32", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_488t354s92.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
edelmanclaudia/hebocr/src/fonts/ho_recognize_font_1.c
double ho_recognize_font_1_nine (const double *array_in) { double return_value = 0.0; return return_value; }
double ho_recognize_font_1_nine(const double *array_in)
double ho_recognize_font_1_nine (const double *array_in)
ho_recognize_font_1_nine
[ "double", "const double *" ]
{ "code": [ ".globl ho_recognize_font_1_nine\n.type ho_recognize_font_1_nine, @function\nho_recognize_font_1_nine:\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\tpxor\t%xmm0, %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t-8(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ho_recognize_font_1_nine\n.type ho_recognize_font_1_nine, @function\nho_recognize_font_1_nine:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\txorps\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl ho_recognize_font_1_nine\n.type ho_recognize_font_1_nine, @function\nho_recognize_font_1_nine:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tpxor\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global ho_recognize_font_1_nine\n.type ho_recognize_font_1_nine, %function\nho_recognize_font_1_nine:\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\txzr, [sp, 24]\n\tldr\td0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ho_recognize_font_1_nine\n.type ho_recognize_font_1_nine, %function\nho_recognize_font_1_nine:\n.LFB35:\n\t.cfi_startproc\n\tmovi\td0, #0\n\tret\n\t.cfi_endproc\n\n", ".global ho_recognize_font_1_nine\n.type ho_recognize_font_1_nine, %function\nho_recognize_font_1_nine:\n.LFB50:\n\t.cfi_startproc\n\tmovi\td0, #0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <string.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": [ "[98.6490029608, 30.2613633207, 74.3650437205, 9.52503773831, 27.7089391952, 2.29160753301, 80.954257352, 95.9646497438, 7.34006709584, 63.4365155954, 38.312646588, 19.7820419722, 51.1663578488, 33.9581520807, 67.9134389477, 92.4330686167, 31.5145120738, 5.80595239828, 18.7784751919, 91.6191862165, 86.4860837653, 9.01889049198, 13.2246904693, 16.4930647688, 39.1879909673, 72.4816076693, 2.96781305676, 78.842341345, 3.57019682398, 96.0435711445, 89.2249462588, 89.1414060276]" ], "var": [ "array_in" ] }, { "value": [ "[23.9353165832, 22.3133474317, 24.6865655956, 84.0808543268, 30.2376691667, 42.2700415034, 24.4875141961, 59.7864078829, 4.83003290213, 45.4095051409, 8.17757931013, 80.0171831598, 97.7446332589, 76.6672966888, 82.3692101599, 99.1061797403, 61.8287352352, 39.9907421975, 75.9076352786, 63.4609679446, 13.9652456283, 64.695484601, 74.0088873094, 45.4274251462, 16.4604454728, 62.6415920588, 66.4704043753, 87.6318843191, 58.7254119308, 29.4932680195, 92.3996219477, 91.6087016307]" ], "var": [ "array_in" ] }, { "value": [ "[58.0374264487, 36.962101813, 98.507852068, 95.8816297222, 63.7419472908, 55.7724785274, 43.0291587851, 84.768505655, 34.5463374555, 64.4694562489, 19.4962460387, 43.3719609463, 26.6824059345, 38.6022410106, 44.3103642241, 77.4425268923, 11.1371752201, 92.9674872901, 43.2334901682, 10.0332299197, 77.9730345286, 87.9199032511, 30.1674657683, 12.0279574059, 5.0908266372, 25.02140853, 85.3530248249, 52.2011269422, 92.8260430551, 61.8627410154, 66.5474334199, 84.3899823477]" ], "var": [ "array_in" ] }, { "value": [ "[81.8977766811, 42.2241072775, 36.0389419403, 10.6062227588, 63.0249350249, 15.9666259694, 93.5590068257, 20.0244983496, 72.3029850552, 84.4070674593, 46.4893415762, 81.0681187416, 38.1590929106, 17.9323266071, 6.23416259482, 17.7692827481, 72.3113595725, 3.61607481402, 64.2223989557, 66.0350630208, 77.024787238, 38.6399153541, 92.632083907, 98.7076464642, 53.8119987219, 27.0020675426, 76.5141430765, 39.2082361042, 44.553477522, 69.6272682027, 39.8589354402, 14.4528094943]" ], "var": [ "array_in" ] }, { "value": [ "[70.2381551191, 85.0249063239, 27.4563417622, 41.9531154129, 79.4846224908, 55.831887876, 40.5944461289, 70.9734311518, 49.7204024419, 67.2095829208, 80.3427731304, 77.2443554365, 74.6940970841, 96.5996197302, 78.9593270853, 48.7057978627, 35.660570521, 9.10130530273, 13.3618423822, 99.7809590917, 41.4173159773, 24.3018676596, 60.2901918345, 5.32863633099, 79.0812974562, 75.587852472, 41.6270719823, 37.1494332422, 88.4024743409, 70.5189817414, 2.30913572611, 69.3235840561]" ], "var": [ "array_in" ] }, { "value": [ "[12.5038417225, 19.334045324, 52.0395144305, 63.9396719422, 72.0720688374, 33.1269346354, 15.3829143361, 62.2633771878, 67.2900044222, 53.8535502231, 46.6471342657, 46.841563278, 84.842661586, 4.10048657438, 57.2414979093, 77.5964086321, 19.9502097256, 68.4858929843, 68.7359474481, 3.6155105917, 65.8977136544, 71.5096599739, 84.0603162767, 73.6221316713, 23.13946827, 51.5462788903, 9.06533980146, 22.4945827758, 25.1769424391, 18.303753178, 17.6641737197, 32.8147372618]" ], "var": [ "array_in" ] }, { "value": [ "[87.6943905592, 33.1865186607, 99.4469144215, 8.06193891384, 13.0374439382, 20.0449108196, 18.0207055397, 29.6165520425, 85.5228770566, 87.0530732382, 62.4272022483, 16.5495182609, 0.658145557684, 44.5160712305, 21.249917876, 7.89191141037, 5.0769509361, 71.4657393351, 26.6678828592, 47.5313438487, 67.3940097536, 31.9255174403, 35.2790936118, 73.483576804, 84.6114500898, 0.920807986445, 9.59952871669, 85.21957816, 99.3032373379, 62.200556209, 46.947282572, 92.9849337004]" ], "var": [ "array_in" ] }, { "value": [ "[11.0128264366, 5.74107853853, 88.03814805, 23.9813007167, 27.2658234741, 18.4275210165, 13.4763407337, 19.1851561554, 63.7012648152, 31.4102182974, 51.9736516576, 77.5261577085, 58.0130921831, 35.2378620985, 3.55302923458, 61.8233668971, 46.3890005346, 60.5048351546, 68.6740275034, 75.1422115932, 70.7946411653, 73.9535518234, 83.9567402278, 33.225710627, 46.4445692608, 8.39464828561, 5.77660007029, 61.9714977448, 65.1757506365, 59.8660491789, 11.3761620518, 77.477702299]" ], "var": [ "array_in" ] }, { "value": [ "[92.5472588643, 80.3759526726, 22.7745985546, 47.5715873875, 78.1434523211, 48.8104975899, 21.7716350669, 82.577283219, 93.4433224681, 74.0770553449, 15.3748813334, 52.5377141482, 66.8535936382, 79.1757703022, 54.8905120582, 72.5248261653, 67.2469348816, 92.8726145983, 47.036469502, 90.8989053065, 36.5107752536, 53.9381265684, 64.8867431951, 11.4639516875, 6.97126215807, 7.71707430741, 75.8390284085, 13.1553601659, 49.3341755675, 30.6200218942, 44.0214744561, 47.0010683128]" ], "var": [ "array_in" ] }, { "value": [ "[34.6568364576, 17.7467823795, 24.1805974398, 51.9025665924, 16.9060642075, 76.1929716078, 33.500482591, 47.4016846395, 3.29772374984, 94.466045908, 13.3701762639, 68.6965068679, 69.2587939282, 66.6645449302, 56.8056897896, 5.65795335459, 22.2522514394, 52.2194004454, 59.4012470899, 64.6012130169, 25.5780428959, 18.0854129967, 34.798151534, 35.8850284806, 38.2895287704, 55.89538908, 69.9250994304, 12.6205521266, 51.7447913102, 68.7024048384, 78.317045589, 67.4173606164]" ], "var": [ "array_in" ] } ], "output": [ { "value": [ "[98.6490029608, 30.2613633207, 74.3650437205, 9.52503773831, 27.7089391952, 2.29160753301, 80.954257352, 95.9646497438, 7.34006709584, 63.4365155954, 38.312646588, 19.7820419722, 51.1663578488, 33.9581520807, 67.9134389477, 92.4330686167, 31.5145120738, 5.80595239828, 18.7784751919, 91.6191862165, 86.4860837653, 9.01889049198, 13.2246904693, 16.4930647688, 39.1879909673, 72.4816076693, 2.96781305676, 78.842341345, 3.57019682398, 96.0435711445, 89.2249462588, 89.1414060276]", "0.0" ], "var": [ "array_in", "returnv" ] }, { "value": [ "[23.9353165832, 22.3133474317, 24.6865655956, 84.0808543268, 30.2376691667, 42.2700415034, 24.4875141961, 59.7864078829, 4.83003290213, 45.4095051409, 8.17757931013, 80.0171831598, 97.7446332589, 76.6672966888, 82.3692101599, 99.1061797403, 61.8287352352, 39.9907421975, 75.9076352786, 63.4609679446, 13.9652456283, 64.695484601, 74.0088873094, 45.4274251462, 16.4604454728, 62.6415920588, 66.4704043753, 87.6318843191, 58.7254119308, 29.4932680195, 92.3996219477, 91.6087016307]", "0.0" ], "var": [ "array_in", "returnv" ] }, { "value": [ "[58.0374264487, 36.962101813, 98.507852068, 95.8816297222, 63.7419472908, 55.7724785274, 43.0291587851, 84.768505655, 34.5463374555, 64.4694562489, 19.4962460387, 43.3719609463, 26.6824059345, 38.6022410106, 44.3103642241, 77.4425268923, 11.1371752201, 92.9674872901, 43.2334901682, 10.0332299197, 77.9730345286, 87.9199032511, 30.1674657683, 12.0279574059, 5.0908266372, 25.02140853, 85.3530248249, 52.2011269422, 92.8260430551, 61.8627410154, 66.5474334199, 84.3899823477]", "0.0" ], "var": [ "array_in", "returnv" ] }, { "value": [ "[81.8977766811, 42.2241072775, 36.0389419403, 10.6062227588, 63.0249350249, 15.9666259694, 93.5590068257, 20.0244983496, 72.3029850552, 84.4070674593, 46.4893415762, 81.0681187416, 38.1590929106, 17.9323266071, 6.23416259482, 17.7692827481, 72.3113595725, 3.61607481402, 64.2223989557, 66.0350630208, 77.024787238, 38.6399153541, 92.632083907, 98.7076464642, 53.8119987219, 27.0020675426, 76.5141430765, 39.2082361042, 44.553477522, 69.6272682027, 39.8589354402, 14.4528094943]", "0.0" ], "var": [ "array_in", "returnv" ] }, { "value": [ "[70.2381551191, 85.0249063239, 27.4563417622, 41.9531154129, 79.4846224908, 55.831887876, 40.5944461289, 70.9734311518, 49.7204024419, 67.2095829208, 80.3427731304, 77.2443554365, 74.6940970841, 96.5996197302, 78.9593270853, 48.7057978627, 35.660570521, 9.10130530273, 13.3618423822, 99.7809590917, 41.4173159773, 24.3018676596, 60.2901918345, 5.32863633099, 79.0812974562, 75.587852472, 41.6270719823, 37.1494332422, 88.4024743409, 70.5189817414, 2.30913572611, 69.3235840561]", "0.0" ], "var": [ "array_in", "returnv" ] }, { "value": [ "[12.5038417225, 19.334045324, 52.0395144305, 63.9396719422, 72.0720688374, 33.1269346354, 15.3829143361, 62.2633771878, 67.2900044222, 53.8535502231, 46.6471342657, 46.841563278, 84.842661586, 4.10048657438, 57.2414979093, 77.5964086321, 19.9502097256, 68.4858929843, 68.7359474481, 3.6155105917, 65.8977136544, 71.5096599739, 84.0603162767, 73.6221316713, 23.13946827, 51.5462788903, 9.06533980146, 22.4945827758, 25.1769424391, 18.303753178, 17.6641737197, 32.8147372618]", "0.0" ], "var": [ "array_in", "returnv" ] }, { "value": [ "[87.6943905592, 33.1865186607, 99.4469144215, 8.06193891384, 13.0374439382, 20.0449108196, 18.0207055397, 29.6165520425, 85.5228770566, 87.0530732382, 62.4272022483, 16.5495182609, 0.658145557684, 44.5160712305, 21.249917876, 7.89191141037, 5.0769509361, 71.4657393351, 26.6678828592, 47.5313438487, 67.3940097536, 31.9255174403, 35.2790936118, 73.483576804, 84.6114500898, 0.920807986445, 9.59952871669, 85.21957816, 99.3032373379, 62.200556209, 46.947282572, 92.9849337004]", "0.0" ], "var": [ "array_in", "returnv" ] }, { "value": [ "[11.0128264366, 5.74107853853, 88.03814805, 23.9813007167, 27.2658234741, 18.4275210165, 13.4763407337, 19.1851561554, 63.7012648152, 31.4102182974, 51.9736516576, 77.5261577085, 58.0130921831, 35.2378620985, 3.55302923458, 61.8233668971, 46.3890005346, 60.5048351546, 68.6740275034, 75.1422115932, 70.7946411653, 73.9535518234, 83.9567402278, 33.225710627, 46.4445692608, 8.39464828561, 5.77660007029, 61.9714977448, 65.1757506365, 59.8660491789, 11.3761620518, 77.477702299]", "0.0" ], "var": [ "array_in", "returnv" ] }, { "value": [ "[92.5472588643, 80.3759526726, 22.7745985546, 47.5715873875, 78.1434523211, 48.8104975899, 21.7716350669, 82.577283219, 93.4433224681, 74.0770553449, 15.3748813334, 52.5377141482, 66.8535936382, 79.1757703022, 54.8905120582, 72.5248261653, 67.2469348816, 92.8726145983, 47.036469502, 90.8989053065, 36.5107752536, 53.9381265684, 64.8867431951, 11.4639516875, 6.97126215807, 7.71707430741, 75.8390284085, 13.1553601659, 49.3341755675, 30.6200218942, 44.0214744561, 47.0010683128]", "0.0" ], "var": [ "array_in", "returnv" ] }, { "value": [ "[34.6568364576, 17.7467823795, 24.1805974398, 51.9025665924, 16.9060642075, 76.1929716078, 33.500482591, 47.4016846395, 3.29772374984, 94.466045908, 13.3701762639, 68.6965068679, 69.2587939282, 66.6645449302, 56.8056897896, 5.65795335459, 22.2522514394, 52.2194004454, 59.4012470899, 64.6012130169, 25.5780428959, 18.0854129967, 34.798151534, 35.8850284806, 38.2895287704, 55.89538908, 69.9250994304, 12.6205521266, 51.7447913102, 68.7024048384, 78.317045589, 67.4173606164]", "0.0" ], "var": [ "array_in", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_35f6j8ax7k.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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* array_in, double returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { double output_temp_4 = array_in[i3]; output_temp_2.push_back(output_temp_4); } output_json["array_in"] = 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["array_in"]) { double input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } double* array_in = &input_temp_1_vec[0]; clock_t begin = clock(); double returnv = ho_recognize_font_1_nine(array_in); clock_t end = 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_in, returnv); }
master
null
{"livein": ["array_in"], "liveout": ["array_in"], "returnvarname": ["returnv"], "execcmd": "", "funname": "ho_recognize_font_1_nine", "funargs": ["array_in"], "typemap": {"array_in": "array(float64#32)", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_35f6j8ax7k.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Reyets/SI3_G2/Cours/PP/TD/TD2/2_wc.c
int separateur(char c) { return (c == ' ' || c == '\t' || c == '\n'); }
int separateur(charc)
int separateur(char c)
separateur
[ "int", "char" ]
{ "code": [ ".globl separateur\n.type separateur, @function\nseparateur:\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$32, -4(%rbp)\n\tje\t.L2\n\tcmpb\t$9, -4(%rbp)\n\tje\t.L2\n\tcmpb\t$10, -4(%rbp)\n\tjne\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 separateur\n.type separateur, @function\nseparateur:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-9(%rdi), %eax\n\tcmpb\t$1, %al\n\tsetbe\t%al\n\tcmpb\t$32, %dil\n\tsete\t%dl\n\torl\t%edx, %eax\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl separateur\n.type separateur, @function\nseparateur:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-9(%rdi), %eax\n\tcmpb\t$1, %al\n\tsetbe\t%al\n\tcmpb\t$32, %dil\n\tsete\t%dl\n\torl\t%edx, %eax\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n", ".global separateur\n.type separateur, %function\nseparateur:\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, 32\n\tbeq\t.L2\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 9\n\tbeq\t.L2\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 10\n\tbne\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 separateur\n.type separateur, %function\nseparateur:\n.LFB13:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw1, w0, #9\n\tcmp\tw0, 32\n\tand\tw1, w1, 255\n\tccmp\tw1, 1, 0, ne\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n", ".global separateur\n.type separateur, %function\nseparateur:\n.LFB23:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw1, w0, #9\n\tcmp\tw0, 32\n\tand\tw1, w1, 255\n\tccmp\tw1, 1, 0, ne\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": [ "70" ], "var": [ "c" ] }, { "value": [ "115" ], "var": [ "c" ] }, { "value": [ "78" ], "var": [ "c" ] }, { "value": [ "111" ], "var": [ "c" ] }, { "value": [ "65" ], "var": [ "c" ] }, { "value": [ "122" ], "var": [ "c" ] }, { "value": [ "8" ], "var": [ "c" ] }, { "value": [ "36" ], "var": [ "c" ] }, { "value": [ "95" ], "var": [ "c" ] }, { "value": [ "6" ], "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_34woj3km6u.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = separateur(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": "separateur", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_34woj3km6u.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
HenryL-study/A-simple-compiler-for-C/test_ct14.c
int foo(int n){ if(n==1){ return (1); } return (n*foo(n-1)); }
int foo(intn)
int foo(int n)
foo
[ "int", "int" ]
{ "code": [ ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovl\t%edi, -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\tsubl\t$1, %eax\n\tmovl\t%eax, %edi\n\tcall\tfoo\n\timull\t-4(%rbp), %eax\n.L3:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n.L3:\n\tcmpl\t$1, %edi\n\tje\t.L4\n\timull\t%edi, %eax\n\tdecl\t%edi\n\tjmp\t.L3\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tcmpl\t$1, %edi\n\tje\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tmovl\t%edi, %edx\n\tsubl\t$1, %edi\n\timull\t%edx, %eax\n\tcmpl\t$1, %edi\n\tjne\t.L2\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\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, 1\n\tbne\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 28]\n\tsub\tw0, w0, #1\n\tbl\tfoo\n\tmov\tw1, w0\n\tldr\tw0, [sp, 28]\n\tmul\tw0, w1, w0\n.L3:\n\tldp\tx29, x30, [sp], 32\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw0, 1\n.L3:\n\tcmp\tw1, 1\n\tbeq\t.L4\n\tmul\tw0, w0, w1\n\tsub\tw1, w1, #1\n\tb\t.L3\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tcmp\tw0, 1\n\tbeq\t.L1\n\tsub\tw0, w0, #2\n\tsub\tw1, w2, #1\n\tcmp\tw0, 17\n\tbls\t.L9\n\tadrp\tx0, .LC0\n\tdup\tv1.4s, w2\n\tmovi\tv0.4s, 0x1\n\tlsr\tw3, w1, 2\n\tldr\tq2, [x0, #:lo12:.LC0]\n\tmov\tw0, 0\n\tmvni\tv3.4s, 0x3\n\tadd\tv1.4s, v1.4s, v2.4s\n\t.p2align 3,,7\n.L5:\n\tmov\tv2.16b, v1.16b\n\tadd\tw0, w0, 1\n\tadd\tv1.4s, v1.4s, v3.4s\n\tcmp\tw0, w3\n\tmul\tv0.4s, v0.4s, v2.4s\n\tbne\t.L5\n\tmovi\tv1.4s, 0\n\tand\tw0, w1, -4\n\tsub\tw2, w2, w0\n\tcmp\tw1, w0\n\text\tv2.16b, v0.16b, v1.16b, #8\n\tmul\tv0.4s, v0.4s, v2.4s\n\text\tv1.16b, v0.16b, v1.16b, #4\n\tmul\tv0.4s, v0.4s, v1.4s\n\tumov\tw0, v0.s[0]\n\tbeq\t.L1\n\tsub\tw1, w2, #1\n\t.p2align 3,,7\n.L8:\n\tmov\tw3, w2\n\tcmp\tw1, 1\n\tmov\tw2, w1\n\tsub\tw1, w1, #1\n\tmul\tw0, w0, w3\n\tbne\t.L8\n.L1:\n\tret\n.L9:\n\tmov\tw0, 1\n\tb\t.L8\n\t.cfi_endproc\n.LC0: \t.word\t0\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "13" ], "var": [ "n" ] }, { "value": [ "33" ], "var": [ "n" ] }, { "value": [ "126" ], "var": [ "n" ] }, { "value": [ "73" ], "var": [ "n" ] }, { "value": [ "44" ], "var": [ "n" ] }, { "value": [ "24" ], "var": [ "n" ] }, { "value": [ "95" ], "var": [ "n" ] }, { "value": [ "98" ], "var": [ "n" ] }, { "value": [ "87" ], "var": [ "n" ] }, { "value": [ "88" ], "var": [ "n" ] } ], "output": [ { "value": [ "1932053504" ], "var": [ "returnv" ] }, { "value": [ "-2147483648" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "-775946240" ], "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_527dbgb_e9.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = foo(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": "foo", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_527dbgb_e9.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
execunix/vinos/external/compiler-rt/test/profile/instrprof-write-file.c
int foo(int X) { return X <= 0 ? -X : X; }
int foo(intX)
int foo(int X)
foo
[ "int", "int" ]
{ "code": [ ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcltd\n\tmovl\t%edx, %eax\n\txorl\t-4(%rbp), %eax\n\tsubl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tcltd\n\txorl\t%edx, %eax\n\tsubl\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tcltd\n\txorl\t%edx, %eax\n\tsubl\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tcsneg\tw0, w0, w0, ge\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcsneg\tw0, w0, w0, ge\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\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": [ "62" ], "var": [ "X" ] }, { "value": [ "125" ], "var": [ "X" ] }, { "value": [ "49" ], "var": [ "X" ] }, { "value": [ "2" ], "var": [ "X" ] }, { "value": [ "114" ], "var": [ "X" ] }, { "value": [ "15" ], "var": [ "X" ] }, { "value": [ "49" ], "var": [ "X" ] }, { "value": [ "62" ], "var": [ "X" ] }, { "value": [ "62" ], "var": [ "X" ] }, { "value": [ "17" ], "var": [ "X" ] } ], "output": [ { "value": [ "62" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "49" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "114" ], "var": [ "returnv" ] }, { "value": [ "15" ], "var": [ "returnv" ] }, { "value": [ "49" ], "var": [ "returnv" ] }, { "value": [ "62" ], "var": [ "returnv" ] }, { "value": [ "62" ], "var": [ "returnv" ] }, { "value": [ "17" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_39_v910pa4.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = foo(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": "foo", "funargs": ["X"], "typemap": {"X": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_39_v910pa4.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
terralinux/systemd/src/label.c
void label_free(const char *label) { }
void label_free(const char *label)
void label_free(const char *label)
label_free
[ "void", "const char *" ]
{ "code": [ ".globl label_free\n.type label_free, @function\nlabel_free:\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 label_free\n.type label_free, @function\nlabel_free:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl label_free\n.type label_free, @function\nlabel_free:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global label_free\n.type label_free, %function\nlabel_free:\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 label_free\n.type label_free, %function\nlabel_free:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global label_free\n.type label_free, %function\nlabel_free:\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": [ "\"rlkmvadhnvlmqlo\"" ], "var": [ "label" ] }, { "value": [ "\"ibwfedmos\"" ], "var": [ "label" ] }, { "value": [ "\"vpqju\"" ], "var": [ "label" ] }, { "value": [ "\"wzpkfpuqksnlzqlxefjdgmefqtp\"" ], "var": [ "label" ] }, { "value": [ "\"qojisvhxgntcaomgojsccpjyeznnm\"" ], "var": [ "label" ] }, { "value": [ "\"\"" ], "var": [ "label" ] }, { "value": [ "\"dqowyczaaqyatxaaxygtoqvat\"" ], "var": [ "label" ] }, { "value": [ "\"qxiyrudzoarebnbcomrqrlefvrfi\"" ], "var": [ "label" ] }, { "value": [ "\"nsxljnsgnibiyyrsjlqsmhwtxamlego\"" ], "var": [ "label" ] }, { "value": [ "\"dgyfbflmwljnxtjyibdsw\"" ], "var": [ "label" ] } ], "output": [ { "value": [ "\"rlkmvadhnvlmqlo\"" ], "var": [ "label" ] }, { "value": [ "\"ibwfedmos\"" ], "var": [ "label" ] }, { "value": [ "\"vpqju\"" ], "var": [ "label" ] }, { "value": [ "\"wzpkfpuqksnlzqlxefjdgmefqtp\"" ], "var": [ "label" ] }, { "value": [ "\"qojisvhxgntcaomgojsccpjyeznnm\"" ], "var": [ "label" ] }, { "value": [ "\"\"" ], "var": [ "label" ] }, { "value": [ "\"dqowyczaaqyatxaaxygtoqvat\"" ], "var": [ "label" ] }, { "value": [ "\"qxiyrudzoarebnbcomrqrlefvrfi\"" ], "var": [ "label" ] }, { "value": [ "\"nsxljnsgnibiyyrsjlqsmhwtxamlego\"" ], "var": [ "label" ] }, { "value": [ "\"dgyfbflmwljnxtjyibdsw\"" ], "var": [ "label" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_32sjvf6u16.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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* label) { json output_json; output_json["label"] = label; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } 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* label = strdup(input_json["label"].get<std::string>().c_str()); clock_t begin = clock(); label_free(label); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(label); }
master
null
{"livein": ["label"], "liveout": ["label"], "returnvarname": [], "execcmd": "", "funname": "label_free", "funargs": ["label"], "typemap": {"label": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32sjvf6u16.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
shucommon/little-routine/c/nowcoder/shoplist.c
int max(int a, int b) { if (a>b) return a; return b; }
int max(inta, intb)
int max(int a, int b)
max
[ "int", "int", "int" ]
{ "code": [ ".globl max\n.type max, @function\nmax:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-8(%rbp), %eax\n\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 max\n.type max, @function\nmax:\n.LFB24:\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 max\n.type max, @function\nmax:\n.LFB39:\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 max\n.type max, %function\nmax:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tcmp\tw1, w0\n\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 max\n.type max, %function\nmax:\n.LFB24:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tcsel\tw0, w0, w1, ge\n\tret\n\t.cfi_endproc\n\n", ".global max\n.type max, %function\nmax:\n.LFB39:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tcsel\tw0, w0, w1, ge\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, 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", "27" ], "var": [ "a", "b" ] }, { "value": [ "83", "88" ], "var": [ "a", "b" ] }, { "value": [ "34", "101" ], "var": [ "a", "b" ] }, { "value": [ "43", "40" ], "var": [ "a", "b" ] }, { "value": [ "79", "84" ], "var": [ "a", "b" ] }, { "value": [ "9", "69" ], "var": [ "a", "b" ] }, { "value": [ "4", "121" ], "var": [ "a", "b" ] }, { "value": [ "5", "16" ], "var": [ "a", "b" ] }, { "value": [ "64", "114" ], "var": [ "a", "b" ] }, { "value": [ "27", "82" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "77" ], "var": [ "returnv" ] }, { "value": [ "88" ], "var": [ "returnv" ] }, { "value": [ "101" ], "var": [ "returnv" ] }, { "value": [ "43" ], "var": [ "returnv" ] }, { "value": [ "84" ], "var": [ "returnv" ] }, { "value": [ "69" ], "var": [ "returnv" ] }, { "value": [ "121" ], "var": [ "returnv" ] }, { "value": [ "16" ], "var": [ "returnv" ] }, { "value": [ "114" ], "var": [ "returnv" ] }, { "value": [ "82" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_608b21zcvz.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = 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": "max", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_608b21zcvz.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
dc-square/SimpleMessage/paho/MQTTPacket.c
void* MQTTPacket_header_only(unsigned char aHeader, char* data, int datalen) { static unsigned char header = 0; header = aHeader; return &header; }
void * MQTTPacket_header_only(unsigned charaHeader, char *data, intdatalen)
void* MQTTPacket_header_only(unsigned char aHeader, char* data, int datalen)
MQTTPacket_header_only
[ "void *", "unsigned char", "char *", "int" ]
{ "code": [ ".globl MQTTPacket_header_only\n.type MQTTPacket_header_only, @function\nMQTTPacket_header_only:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovq\t%rsi, -16(%rbp)\n\tmovl\t%edx, -8(%rbp)\n\tmovb\t%al, -4(%rbp)\n\tmovzbl\t-4(%rbp), %eax\n\tmovb\t%al, header.2679(%rip)\n\tleaq\theader.2679(%rip), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl MQTTPacket_header_only\n.type MQTTPacket_header_only, @function\nMQTTPacket_header_only:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t%dil, header.2830(%rip)\n\tleaq\theader.2830(%rip), %rax\n\tret\n\t.cfi_endproc\n\n", ".globl MQTTPacket_header_only\n.type MQTTPacket_header_only, @function\nMQTTPacket_header_only:\n.LFB27:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t%dil, header.2857(%rip)\n\tleaq\theader.2857(%rip), %rax\n\tret\n\t.cfi_endproc\n\n", ".global MQTTPacket_header_only\n.type MQTTPacket_header_only, %function\nMQTTPacket_header_only:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tstr\tx1, [sp]\n\tstr\tw2, [sp, 8]\n\tadrp\tx0, header.4222\n\tadd\tx0, x0, :lo12:header.4222\n\tldrb\tw1, [sp, 15]\n\tstrb\tw1, [x0]\n\tadrp\tx0, header.4222\n\tadd\tx0, x0, :lo12:header.4222\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global MQTTPacket_header_only\n.type MQTTPacket_header_only, %function\nMQTTPacket_header_only:\n.LFB22:\n\t.cfi_startproc\n\tadrp\tx1, .LANCHOR0\n\tstrb\tw0, [x1, #:lo12:.LANCHOR0]\n\tadd\tx0, x1, :lo12:.LANCHOR0\n\tret\n\t.cfi_endproc\n\n", ".global MQTTPacket_header_only\n.type MQTTPacket_header_only, %function\nMQTTPacket_header_only:\n.LFB27:\n\t.cfi_startproc\n\tadrp\tx1, .LANCHOR0\n\tstrb\tw0, [x1, #:lo12:.LANCHOR0]\n\tadd\tx0, x1, :lo12:.LANCHOR0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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 <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": [ "319", "\"arrhxhwto\"", "74" ], "var": [ "aHeader", "data", "datalen" ] }, { "value": [ "217", "\"axmcgcm\"", "62" ], "var": [ "aHeader", "data", "datalen" ] }, { "value": [ "835", "\"zqxxutocmgeewucsnswr\"", "99" ], "var": [ "aHeader", "data", "datalen" ] }, { "value": [ "338", "\"gtma\"", "23" ], "var": [ "aHeader", "data", "datalen" ] }, { "value": [ "562", "\"bjionqdnx\"", "71" ], "var": [ "aHeader", "data", "datalen" ] }, { "value": [ "128", "\"kmnnwx\"", "113" ], "var": [ "aHeader", "data", "datalen" ] }, { "value": [ "456", "\"pebtjw\"", "22" ], "var": [ "aHeader", "data", "datalen" ] }, { "value": [ "293", "\"qesdzwknxamxygfrkamhwre\"", "17" ], "var": [ "aHeader", "data", "datalen" ] }, { "value": [ "292", "\"lpzvgblzwgeqbvneb\"", "87" ], "var": [ "aHeader", "data", "datalen" ] }, { "value": [ "881", "\"\"", "126" ], "var": [ "aHeader", "data", "datalen" ] } ], "output": [ { "value": [ "\"arrhxhwto\"" ], "var": [ "data" ] }, { "value": [ "\"axmcgcm\"" ], "var": [ "data" ] }, { "value": [ "\"zqxxutocmgeewucsnswr\"" ], "var": [ "data" ] }, { "value": [ "\"gtma\"" ], "var": [ "data" ] }, { "value": [ "\"bjionqdnx\"" ], "var": [ "data" ] }, { "value": [ "\"kmnnwx\"" ], "var": [ "data" ] }, { "value": [ "\"pebtjw\"" ], "var": [ "data" ] }, { "value": [ "\"qesdzwknxamxygfrkamhwre\"" ], "var": [ "data" ] }, { "value": [ "\"lpzvgblzwgeqbvneb\"" ], "var": [ "data" ] }, { "value": [ "\"\"" ], "var": [ "data" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_43fn3pflap.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 aHeader, char* data, int datalen) { json output_json; output_json["data"] = data; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } 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 aHeader = input_json["aHeader"]; char* data = strdup(input_json["data"].get<std::string>().c_str()); int datalen = input_json["datalen"]; clock_t begin = clock(); MQTTPacket_header_only(aHeader, data, datalen); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(aHeader, data, datalen); }
master
null
{"livein": ["aHeader", "data", "datalen"], "liveout": ["data"], "returnvarname": [], "execcmd": "", "funname": "MQTTPacket_header_only", "funargs": ["aHeader", "data", "datalen"], "typemap": {"aHeader": "uint8", "data": "string", "datalen": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_43fn3pflap.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/c-c++-common/rotate-1.c
unsigned int f73 (unsigned int x, unsigned int y) { return (x << y) + (x >> (8 * sizeof (unsigned int) - y)); }
unsigned int f73(unsigned intx, unsigned inty)
unsigned int f73 (unsigned int x, unsigned int y)
f73
[ "unsigned int", "unsigned int", "unsigned int" ]
{ "code": [ ".globl f73\n.type f73, @function\nf73:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-8(%rbp), %eax\n\tmovl\t-4(%rbp), %edx\n\tmovl\t%edx, %esi\n\tmovl\t%eax, %ecx\n\tsall\t%cl, %esi\n\tmovl\t$32, %eax\n\tsubl\t-8(%rbp), %eax\n\tmovl\t-4(%rbp), %edx\n\tmovl\t%eax, %ecx\n\tshrl\t%cl, %edx\n\tmovl\t%edx, %eax\n\taddl\t%esi, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f73\n.type f73, @function\nf73:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %ecx\n\troll\t%cl, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl f73\n.type f73, @function\nf73:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %ecx\n\troll\t%cl, %eax\n\tret\n\t.cfi_endproc\n\n", ".global f73\n.type f73, %function\nf73:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw0, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tlsl\tw1, w1, w0\n\tmov\tw2, 32\n\tldr\tw0, [sp, 8]\n\tsub\tw0, w2, w0\n\tldr\tw2, [sp, 12]\n\tlsr\tw0, w2, w0\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global f73\n.type f73, %function\nf73:\n.LFB0:\n\t.cfi_startproc\n\tneg\tw1, w1\n\tror\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global f73\n.type f73, %function\nf73:\n.LFB0:\n\t.cfi_startproc\n\tneg\tw1, w1\n\tror\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "892", "492" ], "var": [ "x", "y" ] }, { "value": [ "197", "413" ], "var": [ "x", "y" ] }, { "value": [ "515", "692" ], "var": [ "x", "y" ] }, { "value": [ "196", "948" ], "var": [ "x", "y" ] }, { "value": [ "784", "560" ], "var": [ "x", "y" ] }, { "value": [ "21", "482" ], "var": [ "x", "y" ] }, { "value": [ "707", "933" ], "var": [ "x", "y" ] }, { "value": [ "126", "887" ], "var": [ "x", "y" ] }, { "value": [ "143", "326" ], "var": [ "x", "y" ] }, { "value": [ "916", "0" ], "var": [ "x", "y" ] } ], "output": [ { "value": [ "3653632" ], "var": [ "returnv" ] }, { "value": [ "2684354584" ], "var": [ "returnv" ] }, { "value": [ "540016640" ], "var": [ "returnv" ] }, { "value": [ "205520896" ], "var": [ "returnv" ] }, { "value": [ "51380224" ], "var": [ "returnv" ] }, { "value": [ "84" ], "var": [ "returnv" ] }, { "value": [ "22624" ], "var": [ "returnv" ] }, { "value": [ "1056964608" ], "var": [ "returnv" ] }, { "value": [ "9152" ], "var": [ "returnv" ] }, { "value": [ "1832" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_46jfjrwnrf.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(unsigned int x, unsigned int y, unsigned int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); unsigned int x = input_json["x"]; unsigned int y = input_json["y"]; clock_t begin = clock(); unsigned int returnv = f73(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": "f73", "funargs": ["x", "y"], "typemap": {"x": "uint32", "y": "uint32", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_46jfjrwnrf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ZHYfeng/malicious-code-conceal/0_mailcious-code/useful/c_windows/mydoom/work/rot13.c
char rot13c(char c) { char u[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char l[] = "abcdefghijklmnopqrstuvwxyz"; char *p; if ((p = strchr(u, c)) != NULL) return u[((p-u) + 13) % 26]; else if ((p = strchr(l, c)) != NULL) return l[((p-l) + 13) % 26]; else return c; }
char rot13c(charc)
char rot13c(char c)
rot13c
[ "char", "char" ]
{ "code": [ ".globl rot13c\n.type rot13c, @function\nrot13c:\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, %eax\n\tmovb\t%al, -100(%rbp)\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovabsq\t$5208208757389214273, %rax\n\tmovabsq\t$5786930140093827657, %rdx\n\tmovq\t%rax, -80(%rbp)\n\tmovq\t%rdx, -72(%rbp)\n\tmovabsq\t$6365651522798441041, %rax\n\tmovq\t%rax, -64(%rbp)\n\tmovw\t$23129, -56(%rbp)\n\tmovb\t$0, -54(%rbp)\n\tmovabsq\t$7523094288207667809, %rax\n\tmovabsq\t$8101815670912281193, %rdx\n\tmovq\t%rax, -48(%rbp)\n\tmovq\t%rdx, -40(%rbp)\n\tmovabsq\t$8680537053616894577, %rax\n\tmovq\t%rax, -32(%rbp)\n\tmovw\t$31353, -24(%rbp)\n\tmovb\t$0, -22(%rbp)\n\tmovsbl\t-100(%rbp), %edx\n\tleaq\t-80(%rbp), %rax\n\tmovl\t%edx, %esi\n\tmovq\t%rax, %rdi\n\tcall\tstrchr@PLT\n\tmovq\t%rax, -88(%rbp)\n\tcmpq\t$0, -88(%rbp)\n\tje\t.L2\n\tleaq\t-80(%rbp), %rax\n\tmovq\t-88(%rbp), %rdx\n\tsubq\t%rax, %rdx\n\tmovq\t%rdx, %rax\n\tleaq\t13(%rax), %rcx\n\tmovabsq\t$5675921253449092805, %rdx\n\tmovq\t%rcx, %rax\n\timulq\t%rdx\n\tsarq\t$3, %rdx\n\tmovq\t%rcx, %rax\n\tsarq\t$63, %rax\n\tsubq\t%rax, %rdx\n\tmovq\t%rdx, %rax\n\taddq\t%rax, %rax\n\taddq\t%rdx, %rax\n\tsalq\t$2, %rax\n\taddq\t%rdx, %rax\n\taddq\t%rax, %rax\n\tsubq\t%rax, %rcx\n\tmovq\t%rcx, %rdx\n\tmovzbl\t-80(%rbp,%rdx), %eax\n\tjmp\t.L5\n.L2:\n\tmovsbl\t-100(%rbp), %edx\n\tleaq\t-48(%rbp), %rax\n\tmovl\t%edx, %esi\n\tmovq\t%rax, %rdi\n\tcall\tstrchr@PLT\n\tmovq\t%rax, -88(%rbp)\n\tcmpq\t$0, -88(%rbp)\n\tje\t.L4\n\tleaq\t-48(%rbp), %rax\n\tmovq\t-88(%rbp), %rdx\n\tsubq\t%rax, %rdx\n\tmovq\t%rdx, %rax\n\tleaq\t13(%rax), %rcx\n\tmovabsq\t$5675921253449092805, %rdx\n\tmovq\t%rcx, %rax\n\timulq\t%rdx\n\tsarq\t$3, %rdx\n\tmovq\t%rcx, %rax\n\tsarq\t$63, %rax\n\tsubq\t%rax, %rdx\n\tmovq\t%rdx, %rax\n\taddq\t%rax, %rax\n\taddq\t%rdx, %rax\n\tsalq\t$2, %rax\n\taddq\t%rdx, %rax\n\taddq\t%rax, %rax\n\tsubq\t%rax, %rcx\n\tmovq\t%rcx, %rdx\n\tmovzbl\t-48(%rbp,%rdx), %eax\n\tjmp\t.L5\n.L4:\n\tmovzbl\t-100(%rbp), %eax\n.L5:\n\tmovq\t-8(%rbp), %rsi\n\txorq\t%fs:40, %rsi\n\tje\t.L6\n\tcall\t__stack_chk_fail@PLT\n.L6:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl rot13c\n.type rot13c, @function\nrot13c:\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, %eax\n\tmovb\t%al, -100(%rbp)\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovabsq\t$5208208757389214273, %rax\n\tmovabsq\t$5786930140093827657, %rdx\n\tmovq\t%rax, -80(%rbp)\n\tmovq\t%rdx, -72(%rbp)\n\tmovabsq\t$6365651522798441041, %rax\n\tmovq\t%rax, -64(%rbp)\n\tmovw\t$23129, -56(%rbp)\n\tmovb\t$0, -54(%rbp)\n\tmovabsq\t$7523094288207667809, %rax\n\tmovabsq\t$8101815670912281193, %rdx\n\tmovq\t%rax, -48(%rbp)\n\tmovq\t%rdx, -40(%rbp)\n\tmovabsq\t$8680537053616894577, %rax\n\tmovq\t%rax, -32(%rbp)\n\tmovw\t$31353, -24(%rbp)\n\tmovb\t$0, -22(%rbp)\n\tmovsbl\t-100(%rbp), %edx\n\tleaq\t-80(%rbp), %rax\n\tmovl\t%edx, %esi\n\tmovq\t%rax, %rdi\n\tcall\tstrchr@PLT\n\tmovq\t%rax, -88(%rbp)\n\tcmpq\t$0, -88(%rbp)\n\tje\t.L2\n\tleaq\t-80(%rbp), %rax\n\tmovq\t-88(%rbp), %rdx\n\tsubq\t%rax, %rdx\n\tmovq\t%rdx, %rax\n\tleaq\t13(%rax), %rcx\n\tmovabsq\t$5675921253449092805, %rdx\n\tmovq\t%rcx, %rax\n\timulq\t%rdx\n\tsarq\t$3, %rdx\n\tmovq\t%rcx, %rax\n\tsarq\t$63, %rax\n\tsubq\t%rax, %rdx\n\tmovq\t%rdx, %rax\n\taddq\t%rax, %rax\n\taddq\t%rdx, %rax\n\tsalq\t$2, %rax\n\taddq\t%rdx, %rax\n\taddq\t%rax, %rax\n\tsubq\t%rax, %rcx\n\tmovq\t%rcx, %rdx\n\tmovzbl\t-80(%rbp,%rdx), %eax\n\tjmp\t.L5\n.L2:\n\tmovsbl\t-100(%rbp), %edx\n\tleaq\t-48(%rbp), %rax\n\tmovl\t%edx, %esi\n\tmovq\t%rax, %rdi\n\tcall\tstrchr@PLT\n\tmovq\t%rax, -88(%rbp)\n\tcmpq\t$0, -88(%rbp)\n\tje\t.L4\n\tleaq\t-48(%rbp), %rax\n\tmovq\t-88(%rbp), %rdx\n\tsubq\t%rax, %rdx\n\tmovq\t%rdx, %rax\n\tleaq\t13(%rax), %rcx\n\tmovabsq\t$5675921253449092805, %rdx\n\tmovq\t%rcx, %rax\n\timulq\t%rdx\n\tsarq\t$3, %rdx\n\tmovq\t%rcx, %rax\n\tsarq\t$63, %rax\n\tsubq\t%rax, %rdx\n\tmovq\t%rdx, %rax\n\taddq\t%rax, %rax\n\taddq\t%rdx, %rax\n\tsalq\t$2, %rax\n\taddq\t%rdx, %rax\n\taddq\t%rax, %rax\n\tsubq\t%rax, %rcx\n\tmovq\t%rcx, %rdx\n\tmovzbl\t-48(%rbp,%rdx), %eax\n\tjmp\t.L5\n.L4:\n\tmovzbl\t-100(%rbp), %eax\n.L5:\n\tmovq\t-8(%rbp), %rsi\n\txorq\t%fs:40, %rsi\n\tje\t.L6\n\tcall\t__stack_chk_fail@PLT\n.L6:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl rot13c\n.type rot13c, @function\nrot13c:\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\tleaq\t.LC0(%rip), %rsi\n\tmovl\t$27, %ecx\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\tmovl\t%edi, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 3, -40\n\tmovsbl\t%bpl, %ebp\n\tsubq\t$72, %rsp\n\t.cfi_def_cfa_offset 112\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 56(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t2(%rsp), %r13\n\tleaq\t2(%rsp), %rdi\n\trep movsb\n\tleaq\t29(%rsp), %rdi\n\tleaq\t.LC1(%rip), %rsi\n\tmovl\t$27, %ecx\n\trep movsb\n\tmovl\t%ebp, %esi\n\tmovq\t%r13, %rdi\n\tcall\tstrchr@PLT\n\ttestq\t%rax, %rax\n\tje\t.L2\n\tsubq\t%r13, %rax\n\tmovl\t$26, %ecx\n\taddq\t$13, %rax\n\tcqto\n\tidivq\t%rcx\n\tmovb\t2(%rsp,%rdx), %r12b\n\tjmp\t.L3\n.L2:\n\tleaq\t29(%rsp), %rbx\n\tmovl\t%ebp, %esi\n\tmovq\t%rbx, %rdi\n\tcall\tstrchr@PLT\n\ttestq\t%rax, %rax\n\tje\t.L3\n\tsubq\t%rbx, %rax\n\tmovl\t$26, %ecx\n\taddq\t$13, %rax\n\tcqto\n\tidivq\t%rcx\n\tmovb\t29(%rsp,%rdx), %r12b\n.L3:\n\tmovq\t56(%rsp), %rax\n\txorq\t%fs:40, %rax\n\tje\t.L4\n\tcall\t__stack_chk_fail@PLT\n.L4:\n\taddq\t$72, %rsp\n\t.cfi_def_cfa_offset 40\n\tmovl\t%r12d, %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.LC0: \t.string\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n.LC1: \t.string\t\"abcdefghijklmnopqrstuvwxyz\"\n", ".globl rot13c\n.type rot13c, @function\nrot13c:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 13, -16\n\tleaq\t.LC0(%rip), %rsi\n\tmovl\t$27, %ecx\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\tmovl\t%edi, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 3, -40\n\tmovsbl\t%bpl, %ebp\n\tsubq\t$72, %rsp\n\t.cfi_def_cfa_offset 112\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 56(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t2(%rsp), %r13\n\tleaq\t2(%rsp), %rdi\n\trep movsb\n\tleaq\t29(%rsp), %rdi\n\tleaq\t.LC1(%rip), %rsi\n\tmovl\t$27, %ecx\n\trep movsb\n\tmovl\t%ebp, %esi\n\tmovq\t%r13, %rdi\n\tcall\tstrchr@PLT\n\ttestq\t%rax, %rax\n\tje\t.L2\n\tsubq\t%r13, %rax\n\tmovl\t$26, %ecx\n\taddq\t$13, %rax\n\tcqto\n\tidivq\t%rcx\n\tmovb\t2(%rsp,%rdx), %r12b\n\tjmp\t.L3\n.L2:\n\tleaq\t29(%rsp), %rbx\n\tmovl\t%ebp, %esi\n\tmovq\t%rbx, %rdi\n\tcall\tstrchr@PLT\n\ttestq\t%rax, %rax\n\tje\t.L3\n\tsubq\t%rbx, %rax\n\tmovl\t$26, %ecx\n\taddq\t$13, %rax\n\tcqto\n\tidivq\t%rcx\n\tmovb\t29(%rsp,%rdx), %r12b\n.L3:\n\tmovq\t56(%rsp), %rax\n\txorq\t%fs:40, %rax\n\tje\t.L4\n\tcall\t__stack_chk_fail@PLT\n.L4:\n\taddq\t$72, %rsp\n\t.cfi_def_cfa_offset 40\n\tmovl\t%r12d, %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.LC0: \t.string\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n.LC1: \t.string\t\"abcdefghijklmnopqrstuvwxyz\"\n", ".globl rot13c\n.type rot13c, @function\nrot13c:\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\tmovsbl\t%dil, %r12d\n\tmovl\t$31353, %edx\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 6, -24\n\tmovl\t%r12d, %esi\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 3, -32\n\tmovl\t%edi, %ebx\n\tsubq\t$80, %rsp\n\t.cfi_def_cfa_offset 112\n\tmovdqa\t.LC0(%rip), %xmm0\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 72(%rsp)\n\txorl\t%eax, %eax\n\tmovq\t%rsp, %rbp\n\tmovb\t$0, 26(%rsp)\n\tmovabsq\t$6365651522798441041, %rax\n\tmovq\t%rax, 16(%rsp)\n\tmovl\t$23129, %eax\n\tmovq\t%rbp, %rdi\n\tmovaps\t%xmm0, (%rsp)\n\tmovdqa\t.LC1(%rip), %xmm0\n\tmovw\t%ax, 24(%rsp)\n\tmovabsq\t$8680537053616894577, %rax\n\tmovq\t%rax, 48(%rsp)\n\tmovw\t%dx, 56(%rsp)\n\tmovb\t$0, 58(%rsp)\n\tmovaps\t%xmm0, 32(%rsp)\n\tcall\tstrchr@PLT\n\ttestq\t%rax, %rax\n\tje\t.L2\n\tmovabsq\t$5675921253449092805, %rdx\n\tsubq\t%rbp, %rax\n\tleaq\t13(%rax), %rcx\n\tmovq\t%rcx, %rax\n\timulq\t%rdx\n\tmovq\t%rcx, %rax\n\tsarq\t$63, %rax\n\tsarq\t$3, %rdx\n\tsubq\t%rax, %rdx\n\tleaq\t(%rdx,%rdx,2), %rax\n\tleaq\t(%rdx,%rax,4), %rax\n\taddq\t%rax, %rax\n\tsubq\t%rax, %rcx\n\tmovzbl\t(%rsp,%rcx), %eax\n.L1:\n\tmovq\t72(%rsp), %rsi\n\txorq\t%fs:40, %rsi\n\tjne\t.L9\n\taddq\t$80, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 32\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.p2align 4,,10\n\t.p2align 3\n.L2:\n\t.cfi_restore_state\n\tleaq\t32(%rsp), %rbp\n\tmovl\t%r12d, %esi\n\tmovq\t%rbp, %rdi\n\tcall\tstrchr@PLT\n\tmovq\t%rax, %rcx\n\tmovl\t%ebx, %eax\n\ttestq\t%rcx, %rcx\n\tje\t.L1\n\tmovabsq\t$5675921253449092805, %rdx\n\tsubq\t%rbp, %rcx\n\taddq\t$13, %rcx\n\tmovq\t%rcx, %rax\n\timulq\t%rdx\n\tmovq\t%rcx, %rax\n\tsarq\t$63, %rax\n\tsarq\t$3, %rdx\n\tsubq\t%rax, %rdx\n\tleaq\t(%rdx,%rdx,2), %rax\n\tleaq\t(%rdx,%rax,4), %rax\n\taddq\t%rax, %rax\n\tsubq\t%rax, %rcx\n\tmovzbl\t32(%rsp,%rcx), %eax\n\tjmp\t.L1\n.L9:\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n.LC0: \t.quad\t5208208757389214273\n.LC1: \t.quad\t7523094288207667809\n", ".globl rot13c\n.type rot13c, @function\nrot13c:\n.LFB34:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 12, -16\n\tmovsbl\t%dil, %r12d\n\tmovl\t$31353, %edx\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 6, -24\n\tmovl\t%r12d, %esi\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 3, -32\n\tmovl\t%edi, %ebx\n\tsubq\t$80, %rsp\n\t.cfi_def_cfa_offset 112\n\tmovdqa\t.LC0(%rip), %xmm0\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 72(%rsp)\n\txorl\t%eax, %eax\n\tmovq\t%rsp, %rbp\n\tmovb\t$0, 26(%rsp)\n\tmovabsq\t$6365651522798441041, %rax\n\tmovq\t%rax, 16(%rsp)\n\tmovl\t$23129, %eax\n\tmovq\t%rbp, %rdi\n\tmovaps\t%xmm0, (%rsp)\n\tmovdqa\t.LC1(%rip), %xmm0\n\tmovw\t%ax, 24(%rsp)\n\tmovabsq\t$8680537053616894577, %rax\n\tmovq\t%rax, 48(%rsp)\n\tmovw\t%dx, 56(%rsp)\n\tmovb\t$0, 58(%rsp)\n\tmovaps\t%xmm0, 32(%rsp)\n\tcall\tstrchr@PLT\n\ttestq\t%rax, %rax\n\tje\t.L2\n\tmovabsq\t$5675921253449092805, %rdx\n\tsubq\t%rbp, %rax\n\tleaq\t13(%rax), %rcx\n\tmovq\t%rcx, %rax\n\timulq\t%rdx\n\tmovq\t%rcx, %rax\n\tsarq\t$63, %rax\n\tsarq\t$3, %rdx\n\tsubq\t%rax, %rdx\n\tleaq\t(%rdx,%rdx,2), %rax\n\tleaq\t(%rdx,%rax,4), %rax\n\taddq\t%rax, %rax\n\tsubq\t%rax, %rcx\n\tmovzbl\t(%rsp,%rcx), %eax\n.L1:\n\tmovq\t72(%rsp), %rsi\n\txorq\t%fs:40, %rsi\n\tjne\t.L9\n\taddq\t$80, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 32\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.p2align 4,,10\n\t.p2align 3\n.L2:\n\t.cfi_restore_state\n\tleaq\t32(%rsp), %rbp\n\tmovl\t%r12d, %esi\n\tmovq\t%rbp, %rdi\n\tcall\tstrchr@PLT\n\tmovq\t%rax, %rcx\n\tmovl\t%ebx, %eax\n\ttestq\t%rcx, %rcx\n\tje\t.L1\n\tmovabsq\t$5675921253449092805, %rdx\n\tsubq\t%rbp, %rcx\n\taddq\t$13, %rcx\n\tmovq\t%rcx, %rax\n\timulq\t%rdx\n\tmovq\t%rcx, %rax\n\tsarq\t$63, %rax\n\tsarq\t$3, %rdx\n\tsubq\t%rax, %rdx\n\tleaq\t(%rdx,%rdx,2), %rax\n\tleaq\t(%rdx,%rax,4), %rax\n\taddq\t%rax, %rax\n\tsubq\t%rax, %rcx\n\tmovzbl\t32(%rsp,%rcx), %eax\n\tjmp\t.L1\n.L9:\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n.LC0: \t.quad\t5208208757389214273\n.LC1: \t.quad\t7523094288207667809\n", ".global rot13c\n.type rot13c, %function\nrot13c:\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\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\tldr\tx2, [x1, 16]\n\tstr\tx2, [x0, 16]\n\tldr\tw1, [x1, 23]\n\tstr\tw1, [x0, 23]\n\tadrp\tx0, .LC1\n\tadd\tx1, x0, :lo12:.LC1\n\tadd\tx0, sp, 72\n\tldp\tx2, x3, [x1]\n\tstp\tx2, x3, [x0]\n\tldr\tx2, [x1, 16]\n\tstr\tx2, [x0, 16]\n\tldr\tw1, [x1, 23]\n\tstr\tw1, [x0, 23]\n\tadd\tx0, sp, 40\n\tldrb\tw1, [sp, 31]\n\tbl\tstrchr\n\tstr\tx0, [sp, 32]\n\tldr\tx0, [sp, 32]\n\tcmp\tx0, 0\n\tbeq\t.L2\n\tadd\tx0, sp, 40\n\tldr\tx1, [sp, 32]\n\tsub\tx0, x1, x0\n\tadd\tx2, x0, 13\n\tmov\tx0, 20165\n\tmovk\tx0, 0xc4ec, lsl 16\n\tmovk\tx0, 0xec4e, lsl 32\n\tmovk\tx0, 0x4ec4, lsl 48\n\tsmulh\tx0, x2, x0\n\tasr\tx1, x0, 3\n\tasr\tx0, x2, 63\n\tsub\tx1, x1, x0\n\tmov\tx0, x1\n\tlsl\tx0, x0, 1\n\tadd\tx0, x0, x1\n\tlsl\tx0, x0, 2\n\tadd\tx0, x0, x1\n\tlsl\tx0, x0, 1\n\tsub\tx1, x2, x0\n\tadd\tx0, sp, 40\n\tldrb\tw0, [x0, x1]\n\tb\t.L5\n.L2:\n\tadd\tx0, sp, 72\n\tldrb\tw1, [sp, 31]\n\tbl\tstrchr\n\tstr\tx0, [sp, 32]\n\tldr\tx0, [sp, 32]\n\tcmp\tx0, 0\n\tbeq\t.L4\n\tadd\tx0, sp, 72\n\tldr\tx1, [sp, 32]\n\tsub\tx0, x1, x0\n\tadd\tx2, x0, 13\n\tmov\tx0, 20165\n\tmovk\tx0, 0xc4ec, lsl 16\n\tmovk\tx0, 0xec4e, lsl 32\n\tmovk\tx0, 0x4ec4, lsl 48\n\tsmulh\tx0, x2, x0\n\tasr\tx1, x0, 3\n\tasr\tx0, x2, 63\n\tsub\tx1, x1, x0\n\tmov\tx0, x1\n\tlsl\tx0, x0, 1\n\tadd\tx0, x0, x1\n\tlsl\tx0, x0, 2\n\tadd\tx0, x0, x1\n\tlsl\tx0, x0, 1\n\tsub\tx1, x2, x0\n\tadd\tx0, sp, 72\n\tldrb\tw0, [x0, x1]\n\tb\t.L5\n.L4:\n\tldrb\tw0, [sp, 31]\n.L5:\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.L6\n\tbl\t__stack_chk_fail\n.L6:\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\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n.LC1: \t.string\t\"abcdefghijklmnopqrstuvwxyz\"\n", ".global rot13c\n.type rot13c, %function\nrot13c:\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\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\tldr\tx2, [x1, 16]\n\tstr\tx2, [x0, 16]\n\tldr\tw1, [x1, 23]\n\tstr\tw1, [x0, 23]\n\tadrp\tx0, .LC1\n\tadd\tx1, x0, :lo12:.LC1\n\tadd\tx0, sp, 72\n\tldp\tx2, x3, [x1]\n\tstp\tx2, x3, [x0]\n\tldr\tx2, [x1, 16]\n\tstr\tx2, [x0, 16]\n\tldr\tw1, [x1, 23]\n\tstr\tw1, [x0, 23]\n\tldrb\tw1, [sp, 31]\n\tadd\tx0, sp, 40\n\tbl\tstrchr\n\tstr\tx0, [sp, 32]\n\tldr\tx0, [sp, 32]\n\tcmp\tx0, 0\n\tbeq\t.L2\n\tadd\tx0, sp, 40\n\tldr\tx1, [sp, 32]\n\tsub\tx0, x1, x0\n\tadd\tx2, x0, 13\n\tmov\tx0, 20165\n\tmovk\tx0, 0xc4ec, lsl 16\n\tmovk\tx0, 0xec4e, lsl 32\n\tmovk\tx0, 0x4ec4, lsl 48\n\tsmulh\tx0, x2, x0\n\tasr\tx1, x0, 3\n\tasr\tx0, x2, 63\n\tsub\tx1, x1, x0\n\tmov\tx0, x1\n\tlsl\tx0, x0, 1\n\tadd\tx0, x0, x1\n\tlsl\tx0, x0, 2\n\tadd\tx0, x0, x1\n\tlsl\tx0, x0, 1\n\tsub\tx1, x2, x0\n\tadd\tx0, sp, 40\n\tldrb\tw0, [x0, x1]\n\tb\t.L5\n.L2:\n\tldrb\tw1, [sp, 31]\n\tadd\tx0, sp, 72\n\tbl\tstrchr\n\tstr\tx0, [sp, 32]\n\tldr\tx0, [sp, 32]\n\tcmp\tx0, 0\n\tbeq\t.L4\n\tadd\tx0, sp, 72\n\tldr\tx1, [sp, 32]\n\tsub\tx0, x1, x0\n\tadd\tx2, x0, 13\n\tmov\tx0, 20165\n\tmovk\tx0, 0xc4ec, lsl 16\n\tmovk\tx0, 0xec4e, lsl 32\n\tmovk\tx0, 0x4ec4, lsl 48\n\tsmulh\tx0, x2, x0\n\tasr\tx1, x0, 3\n\tasr\tx0, x2, 63\n\tsub\tx1, x1, x0\n\tmov\tx0, x1\n\tlsl\tx0, x0, 1\n\tadd\tx0, x0, x1\n\tlsl\tx0, x0, 2\n\tadd\tx0, x0, x1\n\tlsl\tx0, x0, 1\n\tsub\tx1, x2, x0\n\tadd\tx0, sp, 72\n\tldrb\tw0, [x0, x1]\n\tb\t.L5\n.L4:\n\tldrb\tw0, [sp, 31]\n.L5:\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.L6\n\tbl\t__stack_chk_fail\n.L6:\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\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n.LC1: \t.string\t\"abcdefghijklmnopqrstuvwxyz\"\n", ".global rot13c\n.type rot13c, %function\nrot13c:\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\tx29, sp\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -112\n\t.cfi_offset 20, -104\n\tadrp\tx19, :got:__stack_chk_guard\n\tand\tw20, w0, 255\n\tldr\tx0, [x19, #:got_lo12:__stack_chk_guard]\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -96\n\t.cfi_offset 22, -88\n\tadd\tx22, sp, 56\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 120]\n\tmov\tx1,0\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tldp\tx2, x3, [x0]\n\tstp\tx2, x3, [sp, 56]\n\tldr\tx1, [x0, 16]\n\tstr\tx1, [sp, 72]\n\tldr\tw0, [x0, 23]\n\tstr\tw0, [sp, 79]\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tldp\tx2, x3, [x0]\n\tstp\tx2, x3, [sp, 88]\n\tldr\tx1, [x0, 16]\n\tstr\tx1, [sp, 104]\n\tldr\tw0, [x0, 23]\n\tmov\tw1, w20\n\tstr\tw0, [sp, 111]\n\tmov\tx0, x22\n\tbl\tstrchr\n\tcbz\tx0, .L2\n\tsub\tx0, x0, x22\n\tmov\tx2, 26\n\tadd\tx0, x0, 13\n\tsdiv\tx1, x0, x2\n\tmsub\tx0, x1, x2, x0\n\tldrb\tw20, [x22, x0]\n.L3:\n\tldr\tx19, [x19, #:got_lo12:__stack_chk_guard]\n\tldr\tx0, [sp, 120]\n\tldr\tx1, [x19]\n\tsubs\tx0, x0, x1\n\tmov\tx1, 0\n\tbeq\t.L4\n\tbl\t__stack_chk_fail\n.L2:\n\tadd\tx21, sp, 88\n\tmov\tw1, w20\n\tmov\tx0, x21\n\tbl\tstrchr\n\tcbz\tx0, .L3\n\tsub\tx0, x0, x21\n\tmov\tx2, 26\n\tadd\tx0, x0, 13\n\tsdiv\tx1, x0, x2\n\tmsub\tx0, x1, x2, x0\n\tldrb\tw20, [x21, x0]\n\tb\t.L3\n.L4:\n\tmov\tw0, w20\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [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 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.LC0: \t.string\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n.LC1: \t.string\t\"abcdefghijklmnopqrstuvwxyz\"\n", ".global rot13c\n.type rot13c, %function\nrot13c:\n.LFB24:\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\tx29, sp\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -112\n\t.cfi_offset 20, -104\n\tadrp\tx19, :got:__stack_chk_guard\n\tand\tw20, w0, 255\n\tldr\tx0, [x19, #:got_lo12:__stack_chk_guard]\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -96\n\t.cfi_offset 22, -88\n\tadd\tx22, sp, 56\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 120]\n\tmov\tx1,0\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tldp\tx2, x3, [x0]\n\tstp\tx2, x3, [sp, 56]\n\tldr\tx1, [x0, 16]\n\tstr\tx1, [sp, 72]\n\tldr\tw0, [x0, 23]\n\tstr\tw0, [sp, 79]\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tldp\tx2, x3, [x0]\n\tstp\tx2, x3, [sp, 88]\n\tldr\tx1, [x0, 16]\n\tstr\tx1, [sp, 104]\n\tldr\tw0, [x0, 23]\n\tmov\tw1, w20\n\tstr\tw0, [sp, 111]\n\tmov\tx0, x22\n\tbl\tstrchr\n\tcbz\tx0, .L2\n\tsub\tx0, x0, x22\n\tmov\tx2, 26\n\tadd\tx0, x0, 13\n\tsdiv\tx1, x0, x2\n\tmsub\tx0, x1, x2, x0\n\tldrb\tw20, [x22, x0]\n.L3:\n\tldr\tx19, [x19, #:got_lo12:__stack_chk_guard]\n\tldr\tx0, [sp, 120]\n\tldr\tx1, [x19]\n\tsubs\tx0, x0, x1\n\tmov\tx1, 0\n\tbeq\t.L4\n\tbl\t__stack_chk_fail\n.L2:\n\tadd\tx21, sp, 88\n\tmov\tw1, w20\n\tmov\tx0, x21\n\tbl\tstrchr\n\tcbz\tx0, .L3\n\tsub\tx0, x0, x21\n\tmov\tx2, 26\n\tadd\tx0, x0, 13\n\tsdiv\tx1, x0, x2\n\tmsub\tx0, x1, x2, x0\n\tldrb\tw20, [x21, x0]\n\tb\t.L3\n.L4:\n\tmov\tw0, w20\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [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 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.LC0: \t.string\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n.LC1: \t.string\t\"abcdefghijklmnopqrstuvwxyz\"\n", ".global rot13c\n.type rot13c, %function\nrot13c:\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\tadrp\tx3, .LC0\n\tadd\tx3, x3, :lo12:.LC0\n\tmov\tx29, sp\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -112\n\t.cfi_offset 20, -104\n\tadrp\tx19, :got:__stack_chk_guard\n\tadrp\tx2, .LC1\n\tldr\tx6, [x19, #:got_lo12:__stack_chk_guard]\n\tadd\tx2, x2, :lo12:.LC1\n\tldr\tx4, [x3, 16]\n\tldr\tx7, [x6]\n\tstr\tx7, [sp, 120]\n\tmov\tx7,0\n\tstr\tx4, [sp, 72]\n\tand\tw20, w0, 255\n\tldr\tx4, [x2, 16]\n\tstr\tx4, [sp, 104]\n\tldp\tx6, x7, [x2]\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -96\n\t.cfi_offset 22, -88\n\tldr\tw2, [x2, 23]\n\tldp\tx4, x5, [x3]\n\tadd\tx21, sp, 56\n\tldr\tw3, [x3, 23]\n\tmov\tw1, w20\n\tmov\tx0, x21\n\tstp\tx4, x5, [sp, 56]\n\tstr\tw3, [sp, 79]\n\tstp\tx6, x7, [sp, 88]\n\tstr\tw2, [sp, 111]\n\tbl\tstrchr\n\tcbz\tx0, .L2\n\tmov\tx1, 20165\n\tsub\tx0, x0, x21\n\tmovk\tx1, 0xc4ec, lsl 16\n\tadd\tx0, x0, 13\n\tmovk\tx1, 0xec4e, lsl 32\n\tmovk\tx1, 0x4ec4, lsl 48\n\tsmulh\tx1, x0, x1\n\tasr\tx1, x1, 3\n\tsub\tx1, x1, x0, asr 63\n\tadd\tx2, x1, x1, lsl 1\n\tadd\tx1, x1, x2, lsl 2\n\tsub\tx0, x0, x1, lsl 1\n\tldrb\tw20, [x21, x0]\n.L3:\n\tldr\tx19, [x19, #:got_lo12:__stack_chk_guard]\n\tldr\tx0, [sp, 120]\n\tldr\tx1, [x19]\n\tsubs\tx0, x0, x1\n\tmov\tx1, 0\n\tbne\t.L10\n\tmov\tw0, w20\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx29, x30, [sp], 128\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.L2:\n\t.cfi_restore_state\n\tadd\tx22, sp, 88\n\tmov\tw1, w20\n\tmov\tx0, x22\n\tbl\tstrchr\n\tcbz\tx0, .L3\n\tmov\tx1, 20165\n\tsub\tx0, x0, x22\n\tmovk\tx1, 0xc4ec, lsl 16\n\tadd\tx0, x0, 13\n\tmovk\tx1, 0xec4e, lsl 32\n\tmovk\tx1, 0x4ec4, lsl 48\n\tsmulh\tx1, x0, x1\n\tasr\tx1, x1, 3\n\tsub\tx1, x1, x0, asr 63\n\tadd\tx2, x1, x1, lsl 1\n\tadd\tx1, x1, x2, lsl 2\n\tsub\tx0, x0, x1, lsl 1\n\tldrb\tw20, [x22, x0]\n\tb\t.L3\n.L10:\n\tbl\t__stack_chk_fail\n\t.cfi_endproc\n.LC0: \t.string\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n.LC1: \t.string\t\"abcdefghijklmnopqrstuvwxyz\"\n", ".global rot13c\n.type rot13c, %function\nrot13c:\n.LFB34:\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\tadrp\tx3, .LC0\n\tadrp\tx2, .LC1\n\tmov\tx29, sp\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -112\n\t.cfi_offset 20, -104\n\tadrp\tx19, :got:__stack_chk_guard\n\tand\tw20, w0, 255\n\tldr\tx0, [x19, #:got_lo12:__stack_chk_guard]\n\tadd\tx3, x3, :lo12:.LC0\n\tadd\tx2, x2, :lo12:.LC1\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -96\n\t.cfi_offset 22, -88\n\tldr\tx4, [x0]\n\tstr\tx4, [sp, 120]\n\tmov\tx4,0\n\tldp\tx4, x5, [x3]\n\tadd\tx22, sp, 56\n\tldp\tx6, x7, [x2]\n\tstp\tx4, x5, [sp, 56]\n\tldr\tx0, [x2, 16]\n\tstr\tx0, [sp, 104]\n\tldr\tw2, [x2, 23]\n\tmov\tx0, x22\n\tldr\tx1, [x3, 16]\n\tstr\tx1, [sp, 72]\n\tldr\tw3, [x3, 23]\n\tmov\tw1, w20\n\tstr\tw3, [sp, 79]\n\tstp\tx6, x7, [sp, 88]\n\tstr\tw2, [sp, 111]\n\tbl\tstrchr\n\tcbz\tx0, .L2\n\tmov\tx1, 20165\n\tsub\tx0, x0, x22\n\tmovk\tx1, 0xc4ec, lsl 16\n\tadd\tx0, x0, 13\n\tmovk\tx1, 0xec4e, lsl 32\n\tmovk\tx1, 0x4ec4, lsl 48\n\tsmulh\tx1, x0, x1\n\tasr\tx1, x1, 3\n\tsub\tx1, x1, x0, asr 63\n\tadd\tx2, x1, x1, lsl 1\n\tadd\tx1, x1, x2, lsl 2\n\tsub\tx0, x0, x1, lsl 1\n\tldrb\tw20, [x22, x0]\n.L3:\n\tldr\tx19, [x19, #:got_lo12:__stack_chk_guard]\n\tldr\tx0, [sp, 120]\n\tldr\tx1, [x19]\n\tsubs\tx0, x0, x1\n\tmov\tx1, 0\n\tbne\t.L10\n\tmov\tw0, w20\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx29, x30, [sp], 128\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.L2:\n\t.cfi_restore_state\n\tadd\tx21, sp, 88\n\tmov\tw1, w20\n\tmov\tx0, x21\n\tbl\tstrchr\n\tcbz\tx0, .L3\n\tmov\tx1, 20165\n\tsub\tx0, x0, x21\n\tmovk\tx1, 0xc4ec, lsl 16\n\tadd\tx0, x0, 13\n\tmovk\tx1, 0xec4e, lsl 32\n\tmovk\tx1, 0x4ec4, lsl 48\n\tsmulh\tx1, x0, x1\n\tasr\tx1, x1, 3\n\tsub\tx1, x1, x0, asr 63\n\tadd\tx2, x1, x1, lsl 1\n\tadd\tx1, x1, x2, lsl 2\n\tsub\tx0, x0, x1, lsl 1\n\tldrb\tw20, [x21, x0]\n\tb\t.L3\n.L10:\n\tbl\t__stack_chk_fail\n\t.cfi_endproc\n.LC0: \t.string\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n.LC1: \t.string\t\"abcdefghijklmnopqrstuvwxyz\"\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 */ char* strchr (char*,char) ;
#include <stdio.h> #include <string.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "14" ], "var": [ "c" ] }, { "value": [ "19" ], "var": [ "c" ] }, { "value": [ "87" ], "var": [ "c" ] }, { "value": [ "67" ], "var": [ "c" ] }, { "value": [ "7" ], "var": [ "c" ] }, { "value": [ "92" ], "var": [ "c" ] }, { "value": [ "124" ], "var": [ "c" ] }, { "value": [ "12" ], "var": [ "c" ] }, { "value": [ "0" ], "var": [ "c" ] }, { "value": [ "47" ], "var": [ "c" ] } ], "output": [ { "value": [ "14" ], "var": [ "returnv" ] }, { "value": [ "19" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "80" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "92" ], "var": [ "returnv" ] }, { "value": [ "124" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "78" ], "var": [ "returnv" ] }, { "value": [ "47" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_38qe6fcdx1.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char c, char returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char c = input_json["c"].get<char>(); clock_t begin = clock(); char returnv = rot13c(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": "rot13c", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38qe6fcdx1.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
lecram/zap/src/zcpl_expr.c
char * escape_char(char e) { switch (e) { case 'a': return "\a"; case 'b': return "\b"; case 't': return "\t"; case 'n': return "\n"; case 'v': return "\v"; case 'f': return "\f"; case 'r': return "\r"; case '\"': return "\""; case '\'': return "\'"; case '\\': return "\\"; default: return "\?"; } }
char * escape_char(chare)
char * escape_char(char e)
escape_char
[ "char *", "char" ]
{ "code": [ ".globl escape_char\n.type escape_char, @function\nescape_char:\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$118, %eax\n\tjg\t.L2\n\tcmpl\t$92, %eax\n\tjge\t.L3\n\tcmpl\t$34, %eax\n\tje\t.L4\n\tcmpl\t$39, %eax\n\tje\t.L5\n\tjmp\t.L2\n.L3:\n\tsubl\t$92, %eax\n\tcmpl\t$26, %eax\n\tja\t.L2\n\tmovl\t%eax, %eax\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\t.L7(%rip), %rax\n\tmovl\t(%rdx,%rax), %eax\n\tcltq\n\tleaq\t.L7(%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.L7:\n\t.long\t.L14-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L13-.L7\n\t.long\t.L12-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L11-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L10-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L2-.L7\n\t.long\t.L9-.L7\n\t.long\t.L2-.L7\n\t.long\t.L8-.L7\n\t.long\t.L2-.L7\n\t.long\t.L6-.L7\n\t.text\n.L13:\n\tleaq\t.LC0(%rip), %rax\n\tjmp\t.L15\n.L12:\n\tleaq\t.LC1(%rip), %rax\n\tjmp\t.L15\n.L8:\n\tleaq\t.LC2(%rip), %rax\n\tjmp\t.L15\n.L10:\n\tleaq\t.LC3(%rip), %rax\n\tjmp\t.L15\n.L6:\n\tleaq\t.LC4(%rip), %rax\n\tjmp\t.L15\n.L11:\n\tleaq\t.LC5(%rip), %rax\n\tjmp\t.L15\n.L9:\n\tleaq\t.LC6(%rip), %rax\n\tjmp\t.L15\n.L4:\n\tleaq\t.LC7(%rip), %rax\n\tjmp\t.L15\n.L5:\n\tleaq\t.LC8(%rip), %rax\n\tjmp\t.L15\n.L14:\n\tleaq\t.LC9(%rip), %rax\n\tjmp\t.L15\n.L2:\n\tleaq\t.LC10(%rip), %rax\n.L15:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC4: \t.string\t\"\\013\"\n.LC2: \t.string\t\"\\t\"\n.LC3: \t.string\t\"\\n\"\n.LC5: \t.string\t\"\\f\"\n.LC6: \t.string\t\"\\r\"\n.LC7: \t.string\t\"\\\"\"\n.LC1: \t.string\t\"\\b\"\n.LC0: \t.string\t\"\\007\"\n.LC10: \t.string\t\"?\"\n.LC9: \t.string\t\"\\\\\"\n.LC8: \t.string\t\"'\"\n", ".globl escape_char\n.type escape_char, @function\nescape_char:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC8(%rip), %rax\n\tcmpb\t$102, %dil\n\tje\t.L1\n\tjg\t.L3\n\tleaq\t.LC6(%rip), %rax\n\tcmpb\t$92, %dil\n\tje\t.L1\n\tjg\t.L4\n\tleaq\t.LC7(%rip), %rax\n\tcmpb\t$34, %dil\n\tje\t.L1\n\tcmpb\t$39, %dil\n\tleaq\t.LC0(%rip), %rax\n\tleaq\t.LC9(%rip), %rdx\n\tjmp\t.L16\n.L4:\n\tleaq\t.LC1(%rip), %rax\n\tcmpb\t$97, %dil\n\tje\t.L1\n\tcmpb\t$98, %dil\n\tleaq\t.LC0(%rip), %rax\n\tleaq\t.LC2(%rip), %rdx\n\tjmp\t.L16\n.L3:\n\tleaq\t.LC3(%rip), %rax\n\tcmpb\t$116, %dil\n\tje\t.L1\n\tjg\t.L5\n\tleaq\t.LC5(%rip), %rax\n\tcmpb\t$110, %dil\n\tje\t.L1\n\tcmpb\t$114, %dil\n\tleaq\t.LC0(%rip), %rax\n\tleaq\t.LC4(%rip), %rdx\n\tjmp\t.L16\n.L5:\n\tcmpb\t$118, %dil\n\tleaq\t.LC0(%rip), %rax\n\tleaq\t.LC10(%rip), %rdx\n.L16:\n\tcmove\t%rdx, %rax\n.L1:\n\tret\n\t.cfi_endproc\n.LC4: \t.string\t\"\\r\"\n.LC2: \t.string\t\"\\b\"\n.LC6: \t.string\t\"\\\\\"\n.LC3: \t.string\t\"\\t\"\n.LC5: \t.string\t\"\\n\"\n.LC7: \t.string\t\"\\\"\"\n.LC1: \t.string\t\"\\007\"\n.LC0: \t.string\t\"?\"\n.LC10: \t.string\t\"\\013\"\n.LC9: \t.string\t\"'\"\n.LC8: \t.string\t\"\\f\"\n", ".globl escape_char\n.type escape_char, @function\nescape_char:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC0(%rip), %rax\n\tcmpb\t$118, %dil\n\tjg\t.L1\n\tcmpb\t$91, %dil\n\tjle\t.L18\n\tsubl\t$92, %edi\n\tcmpb\t$26, %dil\n\tja\t.L4\n\tleaq\t.L6(%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.L6:\n\t.long\t.L12-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L16-.L6\n\t.long\t.L11-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L10-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L9-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L4-.L6\n\t.long\t.L8-.L6\n\t.long\t.L4-.L6\n\t.long\t.L7-.L6\n\t.long\t.L4-.L6\n\t.long\t.L5-.L6\n\t.text\n.L11:\n\tleaq\t.LC10(%rip), %rax\n\tret\n.L16:\n\tleaq\t.LC1(%rip), %rax\n.L1:\n\tret\n.L4:\n\tleaq\t.LC0(%rip), %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L18:\n\tleaq\t.LC8(%rip), %rax\n\tcmpb\t$34, %dil\n\tje\t.L1\n\tcmpb\t$39, %dil\n\tleaq\t.LC7(%rip), %rdx\n\tleaq\t.LC0(%rip), %rax\n\tcmove\t%rdx, %rax\n\tret\n.L5:\n\tleaq\t.LC4(%rip), %rax\n\tret\n.L12:\n\tleaq\t.LC9(%rip), %rax\n\tret\n.L10:\n\tleaq\t.LC5(%rip), %rax\n\tret\n.L9:\n\tleaq\t.LC3(%rip), %rax\n\tret\n.L8:\n\tleaq\t.LC6(%rip), %rax\n\tret\n.L7:\n\tleaq\t.LC2(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC4: \t.string\t\"\\013\"\n.LC2: \t.string\t\"\\t\"\n.LC5: \t.string\t\"\\f\"\n.LC3: \t.string\t\"\\n\"\n.LC6: \t.string\t\"\\r\"\n.LC7: \t.string\t\"'\"\n.LC1: \t.string\t\"\\007\"\n.LC0: \t.string\t\"?\"\n.LC10: \t.string\t\"\\b\"\n.LC9: \t.string\t\"\\\\\"\n.LC8: \t.string\t\"\\\"\"\n", ".global escape_char\n.type escape_char, %function\nescape_char:\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, 118\n\tbeq\t.L2\n\tcmp\tw0, 118\n\tbgt\t.L3\n\tcmp\tw0, 116\n\tbeq\t.L4\n\tcmp\tw0, 116\n\tbgt\t.L3\n\tcmp\tw0, 114\n\tbeq\t.L5\n\tcmp\tw0, 114\n\tbgt\t.L3\n\tcmp\tw0, 110\n\tbeq\t.L6\n\tcmp\tw0, 110\n\tbgt\t.L3\n\tcmp\tw0, 102\n\tbeq\t.L7\n\tcmp\tw0, 102\n\tbgt\t.L3\n\tcmp\tw0, 98\n\tbeq\t.L8\n\tcmp\tw0, 98\n\tbgt\t.L3\n\tcmp\tw0, 97\n\tbeq\t.L9\n\tcmp\tw0, 97\n\tbgt\t.L3\n\tcmp\tw0, 92\n\tbeq\t.L10\n\tcmp\tw0, 92\n\tbgt\t.L3\n\tcmp\tw0, 34\n\tbeq\t.L11\n\tcmp\tw0, 39\n\tbeq\t.L12\n\tb\t.L3\n.L9:\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tb\t.L13\n.L8:\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tb\t.L13\n.L4:\n\tadrp\tx0, .LC2\n\tadd\tx0, x0, :lo12:.LC2\n\tb\t.L13\n.L6:\n\tadrp\tx0, .LC3\n\tadd\tx0, x0, :lo12:.LC3\n\tb\t.L13\n.L2:\n\tadrp\tx0, .LC4\n\tadd\tx0, x0, :lo12:.LC4\n\tb\t.L13\n.L7:\n\tadrp\tx0, .LC5\n\tadd\tx0, x0, :lo12:.LC5\n\tb\t.L13\n.L5:\n\tadrp\tx0, .LC6\n\tadd\tx0, x0, :lo12:.LC6\n\tb\t.L13\n.L11:\n\tadrp\tx0, .LC7\n\tadd\tx0, x0, :lo12:.LC7\n\tb\t.L13\n.L12:\n\tadrp\tx0, .LC8\n\tadd\tx0, x0, :lo12:.LC8\n\tb\t.L13\n.L10:\n\tadrp\tx0, .LC9\n\tadd\tx0, x0, :lo12:.LC9\n\tb\t.L13\n.L3:\n\tadrp\tx0, .LC10\n\tadd\tx0, x0, :lo12:.LC10\n.L13:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n.LC4: \t.string\t\"\\013\"\n.LC2: \t.string\t\"\\t\"\n.LC3: \t.string\t\"\\n\"\n.LC5: \t.string\t\"\\f\"\n.LC6: \t.string\t\"\\r\"\n.LC7: \t.string\t\"\\\"\"\n.LC1: \t.string\t\"\\b\"\n.LC0: \t.string\t\"\\007\"\n.LC10: \t.string\t\"?\"\n.LC9: \t.string\t\"\\\\\"\n.LC8: \t.string\t\"'\"\n", ".global escape_char\n.type escape_char, %function\nescape_char:\n.LFB35:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tcmp\tw0, 102\n\tbhi\t.L2\n\tcmp\tw0, 91\n\tbhi\t.L3\n\tcmp\tw0, 34\n\tbeq\t.L16\n\tcmp\tw0, 39\n\tadrp\tx2, .LC2\n\tadrp\tx1, .LC0\n\tadd\tx2, x2, :lo12:.LC2\n\tadd\tx0, x1, :lo12:.LC0\n\tcsel\tx0, x0, x2, ne\n.L1:\n\tret\n.L15:\n\tcmp\tw0, 8\n\tbhi\t.L20\n\tadrp\tx1, .L7\n\tadd\tx1, x1, :lo12:.L7\n\tldrb\tw0, [x1,w0,uxtw]\n\tadr\tx1, .Lrtx7\n\tadd\tx0, x1, w0, sxtb #2\n\tbr\tx0\n.Lrtx7:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L7:\n\t.byte\t(.L18 - .Lrtx7) / 4\n\t.byte\t(.L20 - .Lrtx7) / 4\n\t.byte\t(.L20 - .Lrtx7) / 4\n\t.byte\t(.L20 - .Lrtx7) / 4\n\t.byte\t(.L9 - .Lrtx7) / 4\n\t.byte\t(.L20 - .Lrtx7) / 4\n\t.byte\t(.L8 - .Lrtx7) / 4\n\t.byte\t(.L20 - .Lrtx7) / 4\n\t.byte\t(.L6 - .Lrtx7) / 4\n\t.text\n.L8:\n\tadrp\tx0, .LC7\n\tadd\tx0, x0, :lo12:.LC7\n\tb\t.L1\n.L3:\n\tsub\tw0, w0, #92\n\tcmp\tw0, 10\n\tbhi\t.L20\n\tadrp\tx1, .L12\n\tadd\tx1, x1, :lo12:.L12\n\tldrb\tw0, [x1,w0,uxtw]\n\tadr\tx1, .Lrtx12\n\tadd\tx0, x1, w0, sxtb #2\n\tbr\tx0\n.Lrtx12:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L12:\n\t.byte\t(.L14 - .Lrtx12) / 4\n\t.byte\t(.L20 - .Lrtx12) / 4\n\t.byte\t(.L20 - .Lrtx12) / 4\n\t.byte\t(.L20 - .Lrtx12) / 4\n\t.byte\t(.L20 - .Lrtx12) / 4\n\t.byte\t(.L19 - .Lrtx12) / 4\n\t.byte\t(.L13 - .Lrtx12) / 4\n\t.byte\t(.L20 - .Lrtx12) / 4\n\t.byte\t(.L20 - .Lrtx12) / 4\n\t.byte\t(.L20 - .Lrtx12) / 4\n\t.byte\t(.L11 - .Lrtx12) / 4\n\t.text\n.L13:\n\tadrp\tx0, .LC10\n\tadd\tx0, x0, :lo12:.LC10\n\tb\t.L1\n.L2:\n\tsub\tw0, w0, #110\n\tand\tw1, w0, 255\n\tcmp\tw1, 8\n\tbls\t.L15\n.L20:\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tb\t.L1\n.L6:\n\tadrp\tx0, .LC4\n\tadd\tx0, x0, :lo12:.LC4\n\tb\t.L1\n.L11:\n\tadrp\tx0, .LC5\n\tadd\tx0, x0, :lo12:.LC5\n\tb\t.L1\n.L9:\n\tadrp\tx0, .LC6\n\tadd\tx0, x0, :lo12:.LC6\n\tb\t.L1\n.L14:\n\tadrp\tx0, .LC9\n\tadd\tx0, x0, :lo12:.LC9\n\tb\t.L1\n.L16:\n\tadrp\tx0, .LC8\n\tadd\tx0, x0, :lo12:.LC8\n\tb\t.L1\n.L18:\n\tadrp\tx0, .LC3\n\tadd\tx0, x0, :lo12:.LC3\n\tb\t.L1\n.L19:\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tb\t.L1\n\t.cfi_endproc\n.LC4: \t.string\t\"\\013\"\n.LC2: \t.string\t\"'\"\n.LC5: \t.string\t\"\\f\"\n.LC6: \t.string\t\"\\r\"\n.LC3: \t.string\t\"\\n\"\n.LC7: \t.string\t\"\\t\"\n.LC1: \t.string\t\"\\007\"\n.LC0: \t.string\t\"?\"\n.LC10: \t.string\t\"\\b\"\n.LC9: \t.string\t\"\\\\\"\n.LC8: \t.string\t\"\\\"\"\n", ".global escape_char\n.type escape_char, %function\nescape_char:\n.LFB52:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tcmp\tw0, 102\n\tbeq\t.L6\n\tbhi\t.L3\n\tcmp\tw0, 92\n\tbeq\t.L7\n\tbls\t.L17\n\tcmp\tw0, 97\n\tbeq\t.L10\n\tcmp\tw0, 98\n\tbne\t.L14\n\tadrp\tx0, .LC2\n\tadd\tx0, x0, :lo12:.LC2\n\tret\n\t.p2align 2,,3\n.L17:\n\tcmp\tw0, 34\n\tbeq\t.L8\n\tcmp\tw0, 39\n\tbne\t.L14\n\tadrp\tx0, .LC9\n\tadd\tx0, x0, :lo12:.LC9\n\tret\n\t.p2align 2,,3\n.L3:\n\tcmp\tw0, 116\n\tbeq\t.L12\n\tbls\t.L18\n\tcmp\tw0, 118\n\tadrp\tx1, .LC10\n\tadrp\tx0, .LC0\n\tadd\tx1, x1, :lo12:.LC10\n\tadd\tx0, x0, :lo12:.LC0\n\tcsel\tx0, x0, x1, ne\n\tret\n\t.p2align 2,,3\n.L18:\n\tcmp\tw0, 110\n\tbeq\t.L13\n\tcmp\tw0, 114\n\tbne\t.L14\n\tadrp\tx0, .LC4\n\tadd\tx0, x0, :lo12:.LC4\n\tret\n\t.p2align 2,,3\n.L10:\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tret\n\t.p2align 2,,3\n.L13:\n\tadrp\tx0, .LC5\n\tadd\tx0, x0, :lo12:.LC5\n\tret\n\t.p2align 2,,3\n.L8:\n\tadrp\tx0, .LC7\n\tadd\tx0, x0, :lo12:.LC7\n\tret\n\t.p2align 2,,3\n.L12:\n\tadrp\tx0, .LC3\n\tadd\tx0, x0, :lo12:.LC3\n\tret\n\t.p2align 2,,3\n.L7:\n\tadrp\tx0, .LC6\n\tadd\tx0, x0, :lo12:.LC6\n\tret\n\t.p2align 2,,3\n.L6:\n\tadrp\tx0, .LC8\n\tadd\tx0, x0, :lo12:.LC8\n\tret\n.L14:\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tret\n\t.cfi_endproc\n.LC4: \t.string\t\"\\r\"\n.LC2: \t.string\t\"\\b\"\n.LC5: \t.string\t\"\\n\"\n.LC3: \t.string\t\"\\t\"\n.LC6: \t.string\t\"\\\\\"\n.LC7: \t.string\t\"\\\"\"\n.LC1: \t.string\t\"\\007\"\n.LC0: \t.string\t\"?\"\n.LC10: \t.string\t\"\\013\"\n.LC9: \t.string\t\"'\"\n.LC8: \t.string\t\"\\f\"\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "121" ], "var": [ "e" ] }, { "value": [ "61" ], "var": [ "e" ] }, { "value": [ "7" ], "var": [ "e" ] }, { "value": [ "1" ], "var": [ "e" ] }, { "value": [ "55" ], "var": [ "e" ] }, { "value": [ "18" ], "var": [ "e" ] }, { "value": [ "98" ], "var": [ "e" ] }, { "value": [ "19" ], "var": [ "e" ] }, { "value": [ "116" ], "var": [ "e" ] }, { "value": [ "43" ], "var": [ "e" ] } ], "output": [ { "value": [ "\"?\"" ], "var": [ "returnv" ] }, { "value": [ "\"?\"" ], "var": [ "returnv" ] }, { "value": [ "\"?\"" ], "var": [ "returnv" ] }, { "value": [ "\"?\"" ], "var": [ "returnv" ] }, { "value": [ "\"?\"" ], "var": [ "returnv" ] }, { "value": [ "\"?\"" ], "var": [ "returnv" ] }, { "value": [ "\"\\b\"" ], "var": [ "returnv" ] }, { "value": [ "\"?\"" ], "var": [ "returnv" ] }, { "value": [ "\"\\t\"" ], "var": [ "returnv" ] }, { "value": [ "\"?\"" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_57kezb1res.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 e, char* returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char e = input_json["e"].get<char>(); clock_t begin = clock(); char* returnv = escape_char(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(e, returnv); }
master
null
{"livein": ["e"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "escape_char", "funargs": ["e"], "typemap": {"e": "int8", "returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_57kezb1res.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/gcc.c-torture/compile/20011119-2.c
int xxx(void) { return 23; }
int xxx()
int xxx(void)
xxx
[ "int", "" ]
{ "code": [ ".globl xxx\n.type xxx, @function\nxxx:\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$23, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl xxx\n.type xxx, @function\nxxx:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$23, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl xxx\n.type xxx, @function\nxxx:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$23, %eax\n\tret\n\t.cfi_endproc\n\n", ".global xxx\n.type xxx, %function\nxxx:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 23\n\tret\n\t.cfi_endproc\n\n", ".global xxx\n.type xxx, %function\nxxx:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 23\n\tret\n\t.cfi_endproc\n\n", ".global xxx\n.type xxx, %function\nxxx:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 23\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "23" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_40v8i95txm.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = xxx(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
arm-hot-cold
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "xxx", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_40v8i95txm.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
project-lovelace/lovelace-website/pip/src/sqlparse-0.4.2/src/static/code_stubs/c/chaos.c
void logistic_map(double r, double* x) { }
void logistic_map(doubler, double *x)
void logistic_map(double r, double* x)
logistic_map
[ "void", "double", "double *" ]
{ "code": [ ".globl logistic_map\n.type logistic_map, @function\nlogistic_map:\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\tmovq\t%rdi, -16(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl logistic_map\n.type logistic_map, @function\nlogistic_map:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl logistic_map\n.type logistic_map, @function\nlogistic_map:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global logistic_map\n.type logistic_map, %function\nlogistic_map:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tstr\tx0, [sp]\n\tnop\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global logistic_map\n.type logistic_map, %function\nlogistic_map:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global logistic_map\n.type logistic_map, %function\nlogistic_map:\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": [ "43.5702027189", "[90.9842178848, 51.9187649619, 32.5219171872, 37.9387209933, 14.1066696565, 18.4072301883, 15.0430260598, 88.4301724172, 99.1806714885, 62.4570290583, 83.7320081367, 68.0172419066, 58.0251763918, 95.3315297776, 13.9150197096, 98.2182481973, 69.0138730079, 11.8633458375, 42.5822044942, 60.9652830374, 21.2963232525, 1.86367621265, 17.5183675922, 7.01871309103, 41.3542106609, 87.6615371997, 27.7100878049, 3.7271390777, 58.0518565597, 24.4667499766, 49.0688288086, 92.3978682944]" ], "var": [ "r", "x" ] }, { "value": [ "79.5270360973", "[41.0001882139, 73.8453511614, 28.3992819909, 16.1312369527, 88.2483512927, 2.70271983992, 58.2738274884, 68.0670192688, 0.367023720515, 20.4953555715, 76.2613589109, 51.8682308693, 82.8744814006, 94.8797099589, 51.3975078979, 70.8454264699, 95.4083007972, 12.1772995503, 82.7166953027, 37.4154346529, 38.0881841196, 10.3233036628, 21.9668141408, 92.7391608563, 59.0947307194, 59.1641300253, 17.7427419309, 99.2820008019, 81.854591634, 24.5103554509, 28.7596711701, 4.76583688238]" ], "var": [ "r", "x" ] }, { "value": [ "13.0807261825", "[33.1914035648, 47.3081949847, 13.3938588117, 56.8359298487, 59.189015017, 15.987070159, 6.94235430246, 75.7515487265, 53.690705875, 13.7270132141, 70.7979815407, 48.869567073, 56.48689368, 50.1058204426, 25.2278656653, 86.9715148588, 80.2261174601, 50.9027873823, 83.0403588893, 4.78109088868, 25.9039609456, 93.8433186443, 46.421450357, 91.0438138352, 71.3531789956, 59.4988769418, 77.5046192148, 56.8825785648, 8.06883749522, 85.9344942471, 85.0287853169, 39.1530195659]" ], "var": [ "r", "x" ] }, { "value": [ "56.6913800868", "[40.3202346188, 90.3106389004, 73.4738331368, 61.4366595151, 58.9307364156, 62.0684323807, 77.6663381061, 29.0058537588, 97.0960431533, 84.2370012539, 49.6719443724, 65.5711735188, 5.7065318417, 42.7111506612, 91.2690115168, 62.9867061893, 31.4973632104, 42.7586582637, 95.3672805724, 61.8248660357, 87.4260073852, 60.8623082583, 23.2950327054, 6.00959422074, 94.6881513097, 15.3108741713, 15.3413192862, 72.0888028129, 55.5791605693, 9.29683245069, 39.667939455, 33.2789122354]" ], "var": [ "r", "x" ] }, { "value": [ "96.2378216835", "[44.2893393329, 24.690437741, 65.381140443, 40.8440034004, 34.5775368207, 56.6629838371, 98.8844089719, 11.0544332405, 13.4303972513, 24.0567192082, 71.695803075, 23.177134551, 57.3799505183, 2.72506165848, 54.6155065362, 22.4703563981, 24.8487841785, 7.00177563183, 40.6249871344, 97.4886791589, 34.7730800806, 84.4509795302, 25.5371408462, 18.2702174729, 64.2457910321, 75.8690326971, 20.0759946277, 29.5261608618, 31.0662150399, 1.42226780524, 75.4447798431, 3.26504145126]" ], "var": [ "r", "x" ] }, { "value": [ "95.5590178245", "[42.262235027, 32.2730820201, 82.6753286985, 35.087056025, 87.5313345915, 2.25449795807, 8.9492836865, 6.11355931581, 42.0385126984, 51.5490664331, 5.07046903028, 34.2816096211, 72.3610597373, 44.3659907848, 19.4557516809, 73.8392086646, 4.69177407871, 96.7691285969, 46.4282432154, 88.4057278687, 68.5842238016, 3.71331630596, 13.4652366577, 20.3287432086, 38.5527884867, 97.2651525794, 42.6589621382, 93.1035584117, 23.1611125307, 33.7334052442, 29.2604465057, 18.4972573155]" ], "var": [ "r", "x" ] }, { "value": [ "98.2059299752", "[10.3936923323, 89.2123202116, 24.9504767962, 27.5745677331, 60.6669036566, 43.3029813493, 76.1820532298, 50.5142703839, 36.3872812704, 46.6144694811, 35.4347790006, 16.4669226315, 72.1799025289, 28.1276799544, 96.205037947, 4.58430455707, 37.8115664446, 80.918420867, 78.1509140052, 86.0261156337, 98.6570727275, 14.8102766365, 14.2649810299, 72.5735434892, 58.7117383363, 74.8610619707, 21.192231885, 60.521974242, 6.36892931776, 87.9637366322, 90.6772270064, 11.1669056417]" ], "var": [ "r", "x" ] }, { "value": [ "58.9519595533", "[58.7655962653, 9.48783574305, 94.0880678209, 74.6927529178, 46.8551944403, 40.3877906433, 28.4702891591, 25.1053245727, 15.1307244859, 76.5668493565, 50.8881236893, 64.8016259327, 35.4334160237, 1.3876635145, 79.1544223357, 62.9957814914, 32.311283556, 22.5687884778, 98.7660639909, 39.7043610834, 38.6702870177, 12.1031817436, 27.7292884985, 26.255065404, 84.632549737, 60.3103807171, 6.31482779983, 74.1767512856, 9.71447228845, 74.9966077608, 80.3665153433, 83.449687937]" ], "var": [ "r", "x" ] }, { "value": [ "94.0399752229", "[45.9293454838, 80.6145956399, 13.9788024501, 42.2319333487, 42.9297456958, 79.7316286829, 24.1873264518, 11.4529112525, 93.5967098866, 59.7437538524, 96.5109220437, 6.6069296342, 83.0267730981, 37.728553943, 84.7069080631, 67.9867598004, 36.1908368971, 42.6129709431, 32.368955516, 47.1960793167, 63.9089210891, 82.4701680249, 96.1035850232, 4.84934781112, 15.7463955146, 70.1833637408, 1.23993488593, 82.1049260913, 91.0034114765, 9.21917829508, 20.7892316381, 69.1515402964]" ], "var": [ "r", "x" ] }, { "value": [ "61.2032912519", "[8.40289556876, 73.8449925007, 8.58279355381, 79.5506511242, 0.770837004128, 55.3489441967, 73.5203155732, 20.6141454559, 62.9893151615, 71.2168740753, 46.6496013758, 99.2489891846, 69.3818264983, 36.9501311439, 73.1220261587, 19.5325179019, 24.0011038433, 39.5461298486, 89.8682040175, 19.5300877454, 81.8799723498, 76.0026627901, 65.8438805237, 22.7689024084, 48.9370380412, 57.1040932089, 60.9195485259, 51.5676738326, 52.4668895433, 47.66372406, 37.7466837705, 49.5448575347]" ], "var": [ "r", "x" ] } ], "output": [ { "value": [ "[90.9842178848, 51.9187649619, 32.5219171872, 37.9387209933, 14.1066696565, 18.4072301883, 15.0430260598, 88.4301724172, 99.1806714885, 62.4570290583, 83.7320081367, 68.0172419066, 58.0251763918, 95.3315297776, 13.9150197096, 98.2182481973, 69.0138730079, 11.8633458375, 42.5822044942, 60.9652830374, 21.2963232525, 1.86367621265, 17.5183675922, 7.01871309103, 41.3542106609, 87.6615371997, 27.7100878049, 3.7271390777, 58.0518565597, 24.4667499766, 49.0688288086, 92.3978682944]" ], "var": [ "x" ] }, { "value": [ "[41.0001882139, 73.8453511614, 28.3992819909, 16.1312369527, 88.2483512927, 2.70271983992, 58.2738274884, 68.0670192688, 0.367023720515, 20.4953555715, 76.2613589109, 51.8682308693, 82.8744814006, 94.8797099589, 51.3975078979, 70.8454264699, 95.4083007972, 12.1772995503, 82.7166953027, 37.4154346529, 38.0881841196, 10.3233036628, 21.9668141408, 92.7391608563, 59.0947307194, 59.1641300253, 17.7427419309, 99.2820008019, 81.854591634, 24.5103554509, 28.7596711701, 4.76583688238]" ], "var": [ "x" ] }, { "value": [ "[33.1914035648, 47.3081949847, 13.3938588117, 56.8359298487, 59.189015017, 15.987070159, 6.94235430246, 75.7515487265, 53.690705875, 13.7270132141, 70.7979815407, 48.869567073, 56.48689368, 50.1058204426, 25.2278656653, 86.9715148588, 80.2261174601, 50.9027873823, 83.0403588893, 4.78109088868, 25.9039609456, 93.8433186443, 46.421450357, 91.0438138352, 71.3531789956, 59.4988769418, 77.5046192148, 56.8825785648, 8.06883749522, 85.9344942471, 85.0287853169, 39.1530195659]" ], "var": [ "x" ] }, { "value": [ "[40.3202346188, 90.3106389004, 73.4738331368, 61.4366595151, 58.9307364156, 62.0684323807, 77.6663381061, 29.0058537588, 97.0960431533, 84.2370012539, 49.6719443724, 65.5711735188, 5.7065318417, 42.7111506612, 91.2690115168, 62.9867061893, 31.4973632104, 42.7586582637, 95.3672805724, 61.8248660357, 87.4260073852, 60.8623082583, 23.2950327054, 6.00959422074, 94.6881513097, 15.3108741713, 15.3413192862, 72.0888028129, 55.5791605693, 9.29683245069, 39.667939455, 33.2789122354]" ], "var": [ "x" ] }, { "value": [ "[44.2893393329, 24.690437741, 65.381140443, 40.8440034004, 34.5775368207, 56.6629838371, 98.8844089719, 11.0544332405, 13.4303972513, 24.0567192082, 71.695803075, 23.177134551, 57.3799505183, 2.72506165848, 54.6155065362, 22.4703563981, 24.8487841785, 7.00177563183, 40.6249871344, 97.4886791589, 34.7730800806, 84.4509795302, 25.5371408462, 18.2702174729, 64.2457910321, 75.8690326971, 20.0759946277, 29.5261608618, 31.0662150399, 1.42226780524, 75.4447798431, 3.26504145126]" ], "var": [ "x" ] }, { "value": [ "[42.262235027, 32.2730820201, 82.6753286985, 35.087056025, 87.5313345915, 2.25449795807, 8.9492836865, 6.11355931581, 42.0385126984, 51.5490664331, 5.07046903028, 34.2816096211, 72.3610597373, 44.3659907848, 19.4557516809, 73.8392086646, 4.69177407871, 96.7691285969, 46.4282432154, 88.4057278687, 68.5842238016, 3.71331630596, 13.4652366577, 20.3287432086, 38.5527884867, 97.2651525794, 42.6589621382, 93.1035584117, 23.1611125307, 33.7334052442, 29.2604465057, 18.4972573155]" ], "var": [ "x" ] }, { "value": [ "[10.3936923323, 89.2123202116, 24.9504767962, 27.5745677331, 60.6669036566, 43.3029813493, 76.1820532298, 50.5142703839, 36.3872812704, 46.6144694811, 35.4347790006, 16.4669226315, 72.1799025289, 28.1276799544, 96.205037947, 4.58430455707, 37.8115664446, 80.918420867, 78.1509140052, 86.0261156337, 98.6570727275, 14.8102766365, 14.2649810299, 72.5735434892, 58.7117383363, 74.8610619707, 21.192231885, 60.521974242, 6.36892931776, 87.9637366322, 90.6772270064, 11.1669056417]" ], "var": [ "x" ] }, { "value": [ "[58.7655962653, 9.48783574305, 94.0880678209, 74.6927529178, 46.8551944403, 40.3877906433, 28.4702891591, 25.1053245727, 15.1307244859, 76.5668493565, 50.8881236893, 64.8016259327, 35.4334160237, 1.3876635145, 79.1544223357, 62.9957814914, 32.311283556, 22.5687884778, 98.7660639909, 39.7043610834, 38.6702870177, 12.1031817436, 27.7292884985, 26.255065404, 84.632549737, 60.3103807171, 6.31482779983, 74.1767512856, 9.71447228845, 74.9966077608, 80.3665153433, 83.449687937]" ], "var": [ "x" ] }, { "value": [ "[45.9293454838, 80.6145956399, 13.9788024501, 42.2319333487, 42.9297456958, 79.7316286829, 24.1873264518, 11.4529112525, 93.5967098866, 59.7437538524, 96.5109220437, 6.6069296342, 83.0267730981, 37.728553943, 84.7069080631, 67.9867598004, 36.1908368971, 42.6129709431, 32.368955516, 47.1960793167, 63.9089210891, 82.4701680249, 96.1035850232, 4.84934781112, 15.7463955146, 70.1833637408, 1.23993488593, 82.1049260913, 91.0034114765, 9.21917829508, 20.7892316381, 69.1515402964]" ], "var": [ "x" ] }, { "value": [ "[8.40289556876, 73.8449925007, 8.58279355381, 79.5506511242, 0.770837004128, 55.3489441967, 73.5203155732, 20.6141454559, 62.9893151615, 71.2168740753, 46.6496013758, 99.2489891846, 69.3818264983, 36.9501311439, 73.1220261587, 19.5325179019, 24.0011038433, 39.5461298486, 89.8682040175, 19.5300877454, 81.8799723498, 76.0026627901, 65.8438805237, 22.7689024084, 48.9370380412, 57.1040932089, 60.9195485259, 51.5676738326, 52.4668895433, 47.66372406, 37.7466837705, 49.5448575347]" ], "var": [ "x" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_29dibq1b1f.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 r, double* x) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { double output_temp_4 = x[i3]; output_temp_2.push_back(output_temp_4); } output_json["x"] = 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); double r = input_json["r"]; std::vector<double> input_temp_1_vec; for (auto& elem : input_json["x"]) { double input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } double* x = &input_temp_1_vec[0]; clock_t begin = clock(); logistic_map(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(r, x); }
dependabot
null
{"livein": ["r", "x"], "liveout": ["x"], "returnvarname": [], "execcmd": "", "funname": "logistic_map", "funargs": ["r", "x"], "typemap": {"r": "float64", "x": "array(float64#32)"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_29dibq1b1f.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_099() { return 99; }
int do_099()
int do_099()
do_099
[ "int", "" ]
{ "code": [ ".globl do_099\n.type do_099, @function\ndo_099:\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$99, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_099\n.type do_099, @function\ndo_099:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$99, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_099\n.type do_099, @function\ndo_099:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$99, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_099\n.type do_099, %function\ndo_099:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 99\n\tret\n\t.cfi_endproc\n\n", ".global do_099\n.type do_099, %function\ndo_099:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 99\n\tret\n\t.cfi_endproc\n\n", ".global do_099\n.type do_099, %function\ndo_099:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 99\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "99" ], "var": [ "returnv" ] }, { "value": [ "99" ], "var": [ "returnv" ] }, { "value": [ "99" ], "var": [ "returnv" ] }, { "value": [ "99" ], "var": [ "returnv" ] }, { "value": [ "99" ], "var": [ "returnv" ] }, { "value": [ "99" ], "var": [ "returnv" ] }, { "value": [ "99" ], "var": [ "returnv" ] }, { "value": [ "99" ], "var": [ "returnv" ] }, { "value": [ "99" ], "var": [ "returnv" ] }, { "value": [ "99" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53od0f0brq.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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_099(); clock_t end = 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_099", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53od0f0brq.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
nfinit/PlanetaryWorkbench/src/math/gravity.c
double surface_gravity(double mass, double radius) { return 6.67408E-11 * (mass / (radius * radius)); }
double surface_gravity(doublemass, doubleradius)
double surface_gravity(double mass, double radius)
surface_gravity
[ "double", "double", "double" ]
{ "code": [ ".globl surface_gravity\n.type surface_gravity, @function\nsurface_gravity:\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-16(%rbp), %xmm0\n\tmovapd\t%xmm0, %xmm1\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t-8(%rbp), %xmm0\n\tdivsd\t%xmm1, %xmm0\n\tmovapd\t%xmm0, %xmm1\n\tmovsd\t.LC0(%rip), %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1580726787\n", ".globl surface_gravity\n.type surface_gravity, @function\nsurface_gravity:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmulsd\t%xmm1, %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tmulsd\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1580726787\n", ".globl surface_gravity\n.type surface_gravity, @function\nsurface_gravity:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmulsd\t%xmm1, %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tmulsd\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1580726787\n", ".global surface_gravity\n.type surface_gravity, %function\nsurface_gravity:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tstr\td1, [sp]\n\tldr\td0, [sp]\n\tfmul\td0, d0, d0\n\tldr\td1, [sp, 8]\n\tfdiv\td0, d1, d0\n\tadrp\tx0, .LC0\n\tldr\td1, [x0, #:lo12:.LC0]\n\tfmul\td0, d0, d1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t1580726787\n", ".global surface_gravity\n.type surface_gravity, %function\nsurface_gravity:\n.LFB0:\n\t.cfi_startproc\n\tfmul\td1, d1, d1\n\tadrp\tx0, .LC0\n\tfdiv\td1, d0, d1\n\tldr\td0, [x0, #:lo12:.LC0]\n\tfmul\td0, d1, d0\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t1580726787\n", ".global surface_gravity\n.type surface_gravity, %function\nsurface_gravity:\n.LFB0:\n\t.cfi_startproc\n\tfmul\td1, d1, d1\n\tadrp\tx0, .LC0\n\tldr\td2, [x0, #:lo12:.LC0]\n\tfdiv\td0, d0, d1\n\tfmul\td0, d0, d2\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t1580726787\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <math.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "46.5606613541", "75.5313404311" ], "var": [ "mass", "radius" ] }, { "value": [ "94.8600024235", "41.3707848393" ], "var": [ "mass", "radius" ] }, { "value": [ "8.36665821547", "42.8382119928" ], "var": [ "mass", "radius" ] }, { "value": [ "31.0773898833", "60.0370111282" ], "var": [ "mass", "radius" ] }, { "value": [ "26.9935609696", "18.1835941868" ], "var": [ "mass", "radius" ] }, { "value": [ "58.6158637492", "66.189448177" ], "var": [ "mass", "radius" ] }, { "value": [ "6.55848358245", "43.8413395599" ], "var": [ "mass", "radius" ] }, { "value": [ "63.115135575", "33.5089530358" ], "var": [ "mass", "radius" ] }, { "value": [ "14.9298284697", "40.8413098002" ], "var": [ "mass", "radius" ] }, { "value": [ "88.9847607468", "57.6671211899" ], "var": [ "mass", "radius" ] } ], "output": [ { "value": [ "5.446984813679194e-13" ], "var": [ "returnv" ] }, { "value": [ "3.699022897583309e-12" ], "var": [ "returnv" ] }, { "value": [ "3.042851547273812e-13" ], "var": [ "returnv" ] }, { "value": [ "5.754370459895774e-13" ], "var": [ "returnv" ] }, { "value": [ "5.448690347108213e-12" ], "var": [ "returnv" ] }, { "value": [ "8.929539369247343e-13" ], "var": [ "returnv" ] }, { "value": [ "2.277336532098057e-13" ], "var": [ "returnv" ] }, { "value": [ "3.751484962060551e-12" ], "var": [ "returnv" ] }, { "value": [ "5.973748065073176e-13" ], "var": [ "returnv" ] }, { "value": [ "1.7858727157975304e-12" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_55dljduqv1.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 mass, double radius, 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 mass = input_json["mass"]; double radius = input_json["radius"]; clock_t begin = clock(); double returnv = surface_gravity(mass, radius); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(mass, radius, returnv); }
master
null
{"livein": ["mass", "radius"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "surface_gravity", "funargs": ["mass", "radius"], "typemap": {"mass": "float64", "radius": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55dljduqv1.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
elsys/po-homework/G/01/20/task1.c
long hash(char* word) { int counter=0; long hashed = 42; while(word[counter] != '\0') { hashed += word[counter]*(counter+1); counter ++; } return hashed; }
long hash(char *word)
long hash(char* word)
hash
[ "long", "char *" ]
{ "code": [ ".globl hash\n.type hash, @function\nhash:\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, -12(%rbp)\n\tmovq\t$42, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tmovl\t-12(%rbp), %edx\n\taddl\t$1, %edx\n\timull\t%edx, %eax\n\tcltq\n\taddq\t%rax, -8(%rbp)\n\taddl\t$1, -12(%rbp)\n.L2:\n\tmovl\t-12(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L3\n\tmovq\t-8(%rbp), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl hash\n.type hash, @function\nhash:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%edx, %edx\n\tmovl\t$42, %r8d\n.L2:\n\tincq\t%rdx\n\tmovsbl\t-1(%rdi,%rdx), %eax\n\ttestb\t%al, %al\n\tje\t.L5\n\timull\t%edx, %eax\n\tcltq\n\taddq\t%rax, %r8\n\tjmp\t.L2\n.L5:\n\tmovq\t%r8, %rax\n\tret\n\t.cfi_endproc\n\n", ".globl hash\n.type hash, @function\nhash:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovsbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tje\t.L4\n\tmovl\t$1, %edx\n\tmovl\t$42, %r8d\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\timull\t%edx, %eax\n\taddq\t$1, %rdx\n\tcltq\n\taddq\t%rax, %r8\n\tmovsbl\t-1(%rdi,%rdx), %eax\n\ttestb\t%al, %al\n\tjne\t.L3\n\tmovq\t%r8, %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t$42, %r8d\n\tmovq\t%r8, %rax\n\tret\n\t.cfi_endproc\n\n", ".global hash\n.type hash, %function\nhash:\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, 20]\n\tmov\tx0, 42\n\tstr\tx0, [sp, 24]\n\tb\t.L2\n.L3:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tmov\tw1, w0\n\tldr\tw0, [sp, 20]\n\tadd\tw0, w0, 1\n\tmul\tw0, w1, w0\n\tsxtw\tx0, w0\n\tldr\tx1, [sp, 24]\n\tadd\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n\tldr\tw0, [sp, 20]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 20]\n.L2:\n\tldrsw\tx0, [sp, 20]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L3\n\tldr\tx0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global hash\n.type hash, %function\nhash:\n.LFB13:\n\t.cfi_startproc\n\tsub\tx0, x0, #1\n\tmov\tx2, 0\n\tmov\tx3, 42\n.L2:\n\tadd\tx2, x2, 1\n\tldrb\tw1, [x0, x2]\n\tcbnz\tw1, .L3\n\tmov\tx0, x3\n\tret\n.L3:\n\tmul\tw1, w1, w2\n\tadd\tx3, x3, x1, sxtw\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global hash\n.type hash, %function\nhash:\n.LFB23:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tcbz\tw2, .L4\n\tsub\tx4, x0, #1\n\tmov\tx1, 1\n\tmov\tx0, 42\n\t.p2align 3,,7\n.L3:\n\tmul\tw3, w2, w1\n\tadd\tx1, x1, 1\n\tldrb\tw2, [x4, x1]\n\tadd\tx0, x0, x3, sxtw\n\tcbnz\tw2, .L3\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tx0, 42\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#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": [ "\"hmjhsbhjalqoefvppqyzwqchmjpl\"" ], "var": [ "word" ] }, { "value": [ "\"wadlfgtszavismhye\"" ], "var": [ "word" ] }, { "value": [ "\"bhq\"" ], "var": [ "word" ] }, { "value": [ "\"monvbeznkhqoxsczvmpeftmvpisvyhe\"" ], "var": [ "word" ] }, { "value": [ "\"puasbmptptoxw\"" ], "var": [ "word" ] }, { "value": [ "\"apelbfwyxnuxuwhur\"" ], "var": [ "word" ] }, { "value": [ "\"ytysnvetuhirvgbbas\"" ], "var": [ "word" ] }, { "value": [ "\"davbpsmcgyeuiy\"" ], "var": [ "word" ] }, { "value": [ "\"yccerngifzxkhgahb\"" ], "var": [ "word" ] }, { "value": [ "\"unagjfmomqzupttuhsawwi\"" ], "var": [ "word" ] } ], "output": [ { "value": [ "44632", "\"hmjhsbhjalqoefvppqyzwqchmjpl\"" ], "var": [ "returnv", "word" ] }, { "value": [ "16807", "\"wadlfgtszavismhye\"" ], "var": [ "returnv", "word" ] }, { "value": [ "687", "\"bhq\"" ], "var": [ "returnv", "word" ] }, { "value": [ "55038", "\"monvbeznkhqoxsczvmpeftmvpisvyhe\"" ], "var": [ "returnv", "word" ] }, { "value": [ "10371", "\"puasbmptptoxw\"" ], "var": [ "returnv", "word" ] }, { "value": [ "17465", "\"apelbfwyxnuxuwhur\"" ], "var": [ "returnv", "word" ] }, { "value": [ "18460", "\"ytysnvetuhirvgbbas\"" ], "var": [ "returnv", "word" ] }, { "value": [ "11598", "\"davbpsmcgyeuiy\"" ], "var": [ "returnv", "word" ] }, { "value": [ "16174", "\"yccerngifzxkhgahb\"" ], "var": [ "returnv", "word" ] }, { "value": [ "28294", "\"unagjfmomqzupttuhsawwi\"" ], "var": [ "returnv", "word" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_43l_ratigu.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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* word, long int returnv) { json output_json; output_json["word"] = word; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } 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* word = strdup(input_json["word"].get<std::string>().c_str()); clock_t begin = clock(); long int returnv = hash(word); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(word, returnv); }
master
null
{"livein": ["word"], "liveout": ["word"], "returnvarname": ["returnv"], "execcmd": "", "funname": "hash", "funargs": ["word"], "typemap": {"word": "string", "returnv": "int64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_43l_ratigu.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
magnusjonsson/unitc/doc/examples/good_ptr_fn.c
char *ptr_fn(char *s) { return s; }
char * ptr_fn(char *s)
char *ptr_fn(char *s)
ptr_fn
[ "char *", "char *" ]
{ "code": [ ".globl ptr_fn\n.type ptr_fn, @function\nptr_fn:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ptr_fn\n.type ptr_fn, @function\nptr_fn:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tret\n\t.cfi_endproc\n\n", ".globl ptr_fn\n.type ptr_fn, @function\nptr_fn:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tret\n\t.cfi_endproc\n\n", ".global ptr_fn\n.type ptr_fn, %function\nptr_fn:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tldr\tx0, [sp, 8]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ptr_fn\n.type ptr_fn, %function\nptr_fn:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global ptr_fn\n.type ptr_fn, %function\nptr_fn:\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": [ "\"xl\"" ], "var": [ "s" ] }, { "value": [ "\"yzexhfzwqnphadjknyd\"" ], "var": [ "s" ] }, { "value": [ "\"yofsillxtudsoatduqhk\"" ], "var": [ "s" ] }, { "value": [ "\"ftj\"" ], "var": [ "s" ] }, { "value": [ "\"rvxtzeqjkqhhywnmmapxy\"" ], "var": [ "s" ] }, { "value": [ "\"cimldgugvomlmtujr\"" ], "var": [ "s" ] }, { "value": [ "\"rnnda\"" ], "var": [ "s" ] }, { "value": [ "\"vabcbwaauxmfvlpdasfznx\"" ], "var": [ "s" ] }, { "value": [ "\"zjldxsvcax\"" ], "var": [ "s" ] }, { "value": [ "\"oxuemceqgxreoyybebqtmlkhdrlfxb\"" ], "var": [ "s" ] } ], "output": [ { "value": [ "\"xl\"", "\"xl\"" ], "var": [ "returnv", "s" ] }, { "value": [ "\"yzexhfzwqnphadjknyd\"", "\"yzexhfzwqnphadjknyd\"" ], "var": [ "returnv", "s" ] }, { "value": [ "\"yofsillxtudsoatduqhk\"", "\"yofsillxtudsoatduqhk\"" ], "var": [ "returnv", "s" ] }, { "value": [ "\"ftj\"", "\"ftj\"" ], "var": [ "returnv", "s" ] }, { "value": [ "\"rvxtzeqjkqhhywnmmapxy\"", "\"rvxtzeqjkqhhywnmmapxy\"" ], "var": [ "returnv", "s" ] }, { "value": [ "\"cimldgugvomlmtujr\"", "\"cimldgugvomlmtujr\"" ], "var": [ "returnv", "s" ] }, { "value": [ "\"rnnda\"", "\"rnnda\"" ], "var": [ "returnv", "s" ] }, { "value": [ "\"vabcbwaauxmfvlpdasfznx\"", "\"vabcbwaauxmfvlpdasfznx\"" ], "var": [ "returnv", "s" ] }, { "value": [ "\"zjldxsvcax\"", "\"zjldxsvcax\"" ], "var": [ "returnv", "s" ] }, { "value": [ "\"oxuemceqgxreoyybebqtmlkhdrlfxb\"", "\"oxuemceqgxreoyybebqtmlkhdrlfxb\"" ], "var": [ "returnv", "s" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_44h3t1ll5r.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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* 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(); char* returnv = ptr_fn(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": "ptr_fn", "funargs": ["s"], "typemap": {"s": "string", "returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_44h3t1ll5r.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
xbmc/atv2/xbmc/cores/paplayer/WavPackCodec/utils.c
int check_break (void) { return 0; }
int check_break()
int check_break (void)
check_break
[ "int", "" ]
{ "code": [ ".globl check_break\n.type check_break, @function\ncheck_break:\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 check_break\n.type check_break, @function\ncheck_break:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl check_break\n.type check_break, @function\ncheck_break:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global check_break\n.type check_break, %function\ncheck_break:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global check_break\n.type check_break, %function\ncheck_break:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global check_break\n.type check_break, %function\ncheck_break:\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_35foc90ydr.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = check_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); }
atv2
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "check_break", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_35foc90ydr.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
jjancheta/C_Programming_Fall_2015/assignment3.c
char symbolToDraw(char condition, float avgTemp){ char symbolFunction5; if (condition == 's') symbolFunction5 = '@'; else if (condition == 'c') symbolFunction5 = '~'; else if (condition == 'p' && avgTemp <= 0) symbolFunction5 = '*'; else symbolFunction5 = ';'; return symbolFunction5; }
char symbolToDraw(charcondition, floatavgTemp)
char symbolToDraw(char condition, float avgTemp)
symbolToDraw
[ "char", "char", "float" ]
{ "code": [ ".globl symbolToDraw\n.type symbolToDraw, @function\nsymbolToDraw:\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\tmovss\t%xmm0, -24(%rbp)\n\tmovb\t%al, -20(%rbp)\n\tcmpb\t$115, -20(%rbp)\n\tjne\t.L2\n\tmovb\t$64, -1(%rbp)\n\tjmp\t.L3\n.L2:\n\tcmpb\t$99, -20(%rbp)\n\tjne\t.L4\n\tmovb\t$126, -1(%rbp)\n\tjmp\t.L3\n.L4:\n\tcmpb\t$112, -20(%rbp)\n\tjne\t.L5\n\tpxor\t%xmm0, %xmm0\n\tcomiss\t-24(%rbp), %xmm0\n\tjb\t.L5\n\tmovb\t$42, -1(%rbp)\n\tjmp\t.L3\n.L5:\n\tmovb\t$59, -1(%rbp)\n.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 symbolToDraw\n.type symbolToDraw, @function\nsymbolToDraw:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t$64, %al\n\tcmpb\t$115, %dil\n\tje\t.L1\n\tmovb\t$126, %al\n\tcmpb\t$99, %dil\n\tje\t.L1\n\tmovb\t$59, %al\n\tcmpb\t$112, %dil\n\tjne\t.L1\n\txorps\t%xmm1, %xmm1\n\tcomiss\t%xmm0, %xmm1\n\tsbbl\t%eax, %eax\n\tandl\t$17, %eax\n\taddl\t$42, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl symbolToDraw\n.type symbolToDraw, @function\nsymbolToDraw:\n.LFB34:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$64, %eax\n\tcmpb\t$115, %dil\n\tje\t.L1\n\tmovl\t$126, %eax\n\tcmpb\t$99, %dil\n\tje\t.L1\n\tmovl\t$59, %eax\n\tcmpb\t$112, %dil\n\tje\t.L10\n.L1:\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L10:\n\tpxor\t%xmm1, %xmm1\n\tcomiss\t%xmm0, %xmm1\n\tsbbl\t%eax, %eax\n\tandl\t$17, %eax\n\taddl\t$42, %eax\n\tret\n\t.cfi_endproc\n\n", ".global symbolToDraw\n.type symbolToDraw, %function\nsymbolToDraw:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstrb\tw0, [sp, 15]\n\tstr\ts0, [sp, 8]\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 115\n\tbne\t.L2\n\tmov\tw0, 64\n\tstrb\tw0, [sp, 31]\n\tb\t.L3\n.L2:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 99\n\tbne\t.L4\n\tmov\tw0, 126\n\tstrb\tw0, [sp, 31]\n\tb\t.L3\n.L4:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 112\n\tbne\t.L5\n\tldr\ts0, [sp, 8]\n\tfcmpe\ts0, #0.0\n\tbhi\t.L5\n\tmov\tw0, 42\n\tstrb\tw0, [sp, 31]\n\tb\t.L3\n.L5:\n\tmov\tw0, 59\n\tstrb\tw0, [sp, 31]\n.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 symbolToDraw\n.type symbolToDraw, %function\nsymbolToDraw:\n.LFB24:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tcmp\tw0, 115\n\tbeq\t.L4\n\tcmp\tw0, 99\n\tbeq\t.L5\n\tcmp\tw0, 112\n\tbne\t.L6\n\tfcmpe\ts0, #0.0\n\tmov\tw0, 42\n\tmov\tw1, 59\n\tcsel\tw0, w0, w1, ls\n.L2:\n\tret\n.L4:\n\tmov\tw0, 64\n\tb\t.L2\n.L5:\n\tmov\tw0, 126\n\tb\t.L2\n.L6:\n\tmov\tw0, 59\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global symbolToDraw\n.type symbolToDraw, %function\nsymbolToDraw:\n.LFB34:\n\t.cfi_startproc\n\tand\tw1, w0, 255\n\tmov\tw0, 64\n\tcmp\tw1, 115\n\tbeq\t.L2\n\tcmp\tw1, 99\n\tmov\tw0, 126\n\tbeq\t.L2\n\tcmp\tw1, 112\n\tmov\tw0, 59\n\tbeq\t.L11\n.L2:\n\tret\n\t.p2align 2,,3\n.L11:\n\tfcmpe\ts0, #0.0\n\tmov\tw1, 42\n\tcsel\tw0, w1, w0, 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> #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": [ "117", "98.5058793845" ], "var": [ "condition", "avgTemp" ] }, { "value": [ "36", "0.035221461001" ], "var": [ "condition", "avgTemp" ] }, { "value": [ "45", "48.0415779276" ], "var": [ "condition", "avgTemp" ] }, { "value": [ "44", "53.0079989189" ], "var": [ "condition", "avgTemp" ] }, { "value": [ "86", "65.6038745787" ], "var": [ "condition", "avgTemp" ] }, { "value": [ "102", "37.1197577139" ], "var": [ "condition", "avgTemp" ] }, { "value": [ "3", "4.01707205161" ], "var": [ "condition", "avgTemp" ] }, { "value": [ "4", "46.3602519673" ], "var": [ "condition", "avgTemp" ] }, { "value": [ "64", "12.0422284133" ], "var": [ "condition", "avgTemp" ] }, { "value": [ "67", "15.2306685486" ], "var": [ "condition", "avgTemp" ] } ], "output": [ { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_48ehuj172c.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 condition, float avgTemp, char returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char condition = input_json["condition"].get<char>(); float avgTemp = input_json["avgTemp"]; clock_t begin = clock(); char returnv = symbolToDraw(condition, avgTemp); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(condition, avgTemp, returnv); }
master
null
{"livein": ["condition", "avgTemp"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "symbolToDraw", "funargs": ["condition", "avgTemp"], "typemap": {"condition": "int8", "avgTemp": "float32", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_48ehuj172c.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Seterplus/CSAPP/datalab/bits.c
int ezFiveEighths(int x) { int y = (x << 2) + x; return (y + ((y >> 31) & 7)) >> 3; }
int ezFiveEighths(intx)
int ezFiveEighths(int x)
ezFiveEighths
[ "int", "int" ]
{ "code": [ ".globl ezFiveEighths\n.type ezFiveEighths, @function\nezFiveEighths:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tleal\t0(,%rax,4), %edx\n\tmovl\t-20(%rbp), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsarl\t$31, %eax\n\tandl\t$7, %eax\n\tmovl\t%eax, %edx\n\tmovl\t-4(%rbp), %eax\n\taddl\t%edx, %eax\n\tsarl\t$3, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ezFiveEighths\n.type ezFiveEighths, @function\nezFiveEighths:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rdi,4), %edi\n\tmovl\t%edi, %eax\n\tsarl\t$31, %eax\n\tandl\t$7, %eax\n\taddl\t%edi, %eax\n\tsarl\t$3, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl ezFiveEighths\n.type ezFiveEighths, @function\nezFiveEighths:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rdi,4), %edx\n\tmovl\t%edx, %eax\n\tsarl\t$31, %eax\n\tandl\t$7, %eax\n\taddl\t%edx, %eax\n\tsarl\t$3, %eax\n\tret\n\t.cfi_endproc\n\n", ".global ezFiveEighths\n.type ezFiveEighths, %function\nezFiveEighths:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tlsl\tw0, w0, 2\n\tldr\tw1, [sp, 12]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tasr\tw0, w0, 31\n\tand\tw1, w0, 7\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 3\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ezFiveEighths\n.type ezFiveEighths, %function\nezFiveEighths:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw1, w0, w0, lsl 2\n\tasr\tw0, w1, 31\n\tand\tw0, w0, 7\n\tadd\tw0, w0, w1\n\tasr\tw0, w0, 3\n\tret\n\t.cfi_endproc\n\n", ".global ezFiveEighths\n.type ezFiveEighths, %function\nezFiveEighths:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw1, w0, w0, lsl 2\n\tasr\tw0, w1, 31\n\tand\tw0, w0, 7\n\tadd\tw0, w0, w1\n\tasr\tw0, w0, 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
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "36" ], "var": [ "x" ] }, { "value": [ "107" ], "var": [ "x" ] }, { "value": [ "2" ], "var": [ "x" ] }, { "value": [ "4" ], "var": [ "x" ] }, { "value": [ "79" ], "var": [ "x" ] }, { "value": [ "29" ], "var": [ "x" ] }, { "value": [ "64" ], "var": [ "x" ] }, { "value": [ "31" ], "var": [ "x" ] }, { "value": [ "24" ], "var": [ "x" ] }, { "value": [ "26" ], "var": [ "x" ] } ], "output": [ { "value": [ "22" ], "var": [ "returnv" ] }, { "value": [ "66" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "49" ], "var": [ "returnv" ] }, { "value": [ "18" ], "var": [ "returnv" ] }, { "value": [ "40" ], "var": [ "returnv" ] }, { "value": [ "19" ], "var": [ "returnv" ] }, { "value": [ "15" ], "var": [ "returnv" ] }, { "value": [ "16" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_54hj2rnki3.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = ezFiveEighths(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": "ezFiveEighths", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_54hj2rnki3.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
AllenDowney/ExercisesInC/exercises/ex02.5/find_track.c
void find_track_regex(char pattern[]) { }
void find_track_regex(char *pattern)
void find_track_regex(char pattern[])
find_track_regex
[ "void", "char *" ]
{ "code": [ ".globl find_track_regex\n.type find_track_regex, @function\nfind_track_regex:\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 find_track_regex\n.type find_track_regex, @function\nfind_track_regex:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl find_track_regex\n.type find_track_regex, @function\nfind_track_regex:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global find_track_regex\n.type find_track_regex, %function\nfind_track_regex:\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 find_track_regex\n.type find_track_regex, %function\nfind_track_regex:\n.LFB35:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global find_track_regex\n.type find_track_regex, %function\nfind_track_regex:\n.LFB50:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <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": [ "\"jmmpxarmodoizgez\"" ], "var": [ "pattern" ] }, { "value": [ "\"bnzsypqwgt\"" ], "var": [ "pattern" ] }, { "value": [ "\"kmdfhe\"" ], "var": [ "pattern" ] }, { "value": [ "\"vmzikst\"" ], "var": [ "pattern" ] }, { "value": [ "\"sjmeztlustajelhue\"" ], "var": [ "pattern" ] }, { "value": [ "\"yi\"" ], "var": [ "pattern" ] }, { "value": [ "\"tlylhl\"" ], "var": [ "pattern" ] }, { "value": [ "\"dgqclsnwxbzdzvdcwnxr\"" ], "var": [ "pattern" ] }, { "value": [ "\"gohwmoukvc\"" ], "var": [ "pattern" ] }, { "value": [ "\"xklp\"" ], "var": [ "pattern" ] } ], "output": [ { "value": [ "\"jmmpxarmodoizgez\"" ], "var": [ "pattern" ] }, { "value": [ "\"bnzsypqwgt\"" ], "var": [ "pattern" ] }, { "value": [ "\"kmdfhe\"" ], "var": [ "pattern" ] }, { "value": [ "\"vmzikst\"" ], "var": [ "pattern" ] }, { "value": [ "\"sjmeztlustajelhue\"" ], "var": [ "pattern" ] }, { "value": [ "\"yi\"" ], "var": [ "pattern" ] }, { "value": [ "\"tlylhl\"" ], "var": [ "pattern" ] }, { "value": [ "\"dgqclsnwxbzdzvdcwnxr\"" ], "var": [ "pattern" ] }, { "value": [ "\"gohwmoukvc\"" ], "var": [ "pattern" ] }, { "value": [ "\"xklp\"" ], "var": [ "pattern" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_58psw_ffzp.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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* pattern) { json output_json; output_json["pattern"] = pattern; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } 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* pattern = strdup(input_json["pattern"].get<std::string>().c_str()); clock_t begin = clock(); find_track_regex(pattern); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(pattern); }
master
null
{"livein": ["pattern"], "liveout": ["pattern"], "returnvarname": [], "execcmd": "", "funname": "find_track_regex", "funargs": ["pattern"], "typemap": {"pattern": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_58psw_ffzp.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Cnidarias/al-go-rithms/math/strong_number/C/strong.c
int fact(int x) { if(x > 1) return x*fact(x-1); else return 1; }
int fact(intx)
int fact(int x)
fact
[ "int", "int" ]
{ "code": [ ".globl fact\n.type fact, @function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$1, -4(%rbp)\n\tjle\t.L2\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$1, %eax\n\tmovl\t%eax, %edi\n\tcall\tfact\n\timull\t-4(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$1, %eax\n.L3:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fact\n.type fact, @function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n.L3:\n\tcmpl\t$1, %edi\n\tjle\t.L1\n\timull\t%edi, %eax\n\tdecl\t%edi\n\tjmp\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl fact\n.type fact, @function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tcmpl\t$1, %edi\n\tjle\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t%edi, %edx\n\tsubl\t$1, %edi\n\timull\t%edx, %eax\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\n", ".global fact\n.type fact, %function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -32]!\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 29, -32\n\t.cfi_offset 30, -24\n\tmov\tx29, sp\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 1\n\tble\t.L2\n\tldr\tw0, [sp, 28]\n\tsub\tw0, w0, #1\n\tbl\tfact\n\tmov\tw1, w0\n\tldr\tw0, [sp, 28]\n\tmul\tw0, w1, w0\n\tb\t.L3\n.L2:\n\tmov\tw0, 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 fact\n.type fact, %function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw0, 1\n.L3:\n\tcmp\tw1, 1\n\tble\t.L1\n\tmul\tw0, w0, w1\n\tsub\tw1, w1, #1\n\tb\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global fact\n.type fact, %function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tcmp\tw0, 1\n\tble\t.L8\n\tsub\tw0, w0, #2\n\tsub\tw1, w2, #1\n\tcmp\tw0, 17\n\tbls\t.L9\n\tadrp\tx0, .LC0\n\tdup\tv1.4s, w2\n\tmovi\tv0.4s, 0x1\n\tlsr\tw3, w1, 2\n\tldr\tq2, [x0, #:lo12:.LC0]\n\tmov\tw0, 0\n\tmvni\tv3.4s, 0x3\n\tadd\tv1.4s, v1.4s, v2.4s\n\t.p2align 3,,7\n.L4:\n\tmov\tv2.16b, v1.16b\n\tadd\tw0, w0, 1\n\tadd\tv1.4s, v1.4s, v3.4s\n\tcmp\tw0, w3\n\tmul\tv0.4s, v0.4s, v2.4s\n\tbne\t.L4\n\tmovi\tv1.4s, 0\n\tand\tw0, w1, -4\n\tsub\tw2, w2, w0\n\tcmp\tw1, w0\n\text\tv2.16b, v0.16b, v1.16b, #8\n\tmul\tv0.4s, v0.4s, v2.4s\n\text\tv1.16b, v0.16b, v1.16b, #4\n\tmul\tv0.4s, v0.4s, v1.4s\n\tumov\tw0, v0.s[0]\n\tbeq\t.L1\n\tsub\tw1, w2, #1\n\t.p2align 3,,7\n.L7:\n\tmov\tw3, w2\n\tcmp\tw1, 1\n\tmov\tw2, w1\n\tsub\tw1, w1, #1\n\tmul\tw0, w0, w3\n\tbne\t.L7\n.L1:\n\tret\n\t.p2align 2,,3\n.L8:\n\tmov\tw0, 1\n\tret\n.L9:\n\tmov\tw0, 1\n\tb\t.L7\n\t.cfi_endproc\n.LC0: \t.word\t0\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "24" ], "var": [ "x" ] }, { "value": [ "62" ], "var": [ "x" ] }, { "value": [ "74" ], "var": [ "x" ] }, { "value": [ "52" ], "var": [ "x" ] }, { "value": [ "64" ], "var": [ "x" ] }, { "value": [ "50" ], "var": [ "x" ] }, { "value": [ "11" ], "var": [ "x" ] }, { "value": [ "39" ], "var": [ "x" ] }, { "value": [ "67" ], "var": [ "x" ] }, { "value": [ "43" ], "var": [ "x" ] } ], "output": [ { "value": [ "-775946240" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "39916800" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_42l81892qm.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = fact(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": "fact", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42l81892qm.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
fstudio/tinycc/tests/tests2/79_vla_continue.c
int f(void) { return 5; }
int f()
int f(void)
f
[ "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$5, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$5, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$5, %eax\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 5\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw0, 5\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB23:\n\t.cfi_startproc\n\tmov\tw0, 5\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#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": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_54bsunjvc4.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = f(); clock_t end = 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); }
dev
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "f", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_54bsunjvc4.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
sheijk/Zomp/tests/llvmtest/source_level_debug.c
int numA(int x) { return x + 1; }
int numA(intx)
int numA(int x)
numA
[ "int", "int" ]
{ "code": [ ".globl numA\n.type numA, @function\nnumA:\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 numA\n.type numA, @function\nnumA:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl numA\n.type numA, @function\nnumA:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global numA\n.type numA, %function\nnumA:\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 numA\n.type numA, %function\nnumA:\n.LFB13:\n\t.cfi_startproc\n\tadd\tw0, w0, 1\n\tret\n\t.cfi_endproc\n\n", ".global numA\n.type numA, %function\nnumA:\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": [ "35" ], "var": [ "x" ] }, { "value": [ "34" ], "var": [ "x" ] }, { "value": [ "59" ], "var": [ "x" ] }, { "value": [ "35" ], "var": [ "x" ] }, { "value": [ "112" ], "var": [ "x" ] }, { "value": [ "6" ], "var": [ "x" ] }, { "value": [ "103" ], "var": [ "x" ] }, { "value": [ "105" ], "var": [ "x" ] }, { "value": [ "9" ], "var": [ "x" ] }, { "value": [ "121" ], "var": [ "x" ] } ], "output": [ { "value": [ "36" ], "var": [ "returnv" ] }, { "value": [ "35" ], "var": [ "returnv" ] }, { "value": [ "60" ], "var": [ "returnv" ] }, { "value": [ "36" ], "var": [ "returnv" ] }, { "value": [ "113" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "104" ], "var": [ "returnv" ] }, { "value": [ "106" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "122" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_50ov8zqpu2.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = numA(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": "numA", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_50ov8zqpu2.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
stevedonovan/Lake/examples/big1/c021.c
int c021(void) { return 0; }
int c021()
int c021(void)
c021
[ "int", "" ]
{ "code": [ ".globl c021\n.type c021, @function\nc021:\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 c021\n.type c021, @function\nc021:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl c021\n.type c021, @function\nc021:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global c021\n.type c021, %function\nc021:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global c021\n.type c021, %function\nc021:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global c021\n.type c021, %function\nc021:\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_331worbucg.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = c021(); clock_t end = 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": "c021", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_331worbucg.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
8l/AutoCorres/autocorres/tests/parse-tests/heap_lift_array.c
unsigned int fuzz(unsigned int bizz[][10]) { return bizz[1][1]; }
unsigned int fuzz(unsigned intbizz)
unsigned int fuzz(unsigned int bizz[][10])
fuzz
[ "unsigned int", "unsigned int" ]
{ "code": [ ".globl fuzz\n.type fuzz, @function\nfuzz:\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\taddq\t$40, %rax\n\tmovl\t4(%rax), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fuzz\n.type fuzz, @function\nfuzz:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t44(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl fuzz\n.type fuzz, @function\nfuzz:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t44(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global fuzz\n.type fuzz, %function\nfuzz:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 40\n\tldr\tw0, [x0, 4]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fuzz\n.type fuzz, %function\nfuzz:\n.LFB0:\n\t.cfi_startproc\n\tldr\tw0, [x0, 44]\n\tret\n\t.cfi_endproc\n\n", ".global fuzz\n.type fuzz, %function\nfuzz:\n.LFB0:\n\t.cfi_startproc\n\tldr\tw0, [x0, 44]\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "[200, 837, 884, 519, 186, 23, 388, 797, 654, 574, 845, 988, 946, 959, 511, 287, 728, 715, 163, 208, 995, 423, 627, 321, 284, 28, 767, 668, 744, 51, 462, 326]" ], "var": [ "bizz" ] }, { "value": [ "[857, 97, 244, 959, 725, 966, 921, 917, 196, 12, 699, 985, 849, 139, 388, 776, 177, 610, 203, 894, 855, 376, 871, 389, 541, 213, 899, 983, 157, 482, 804, 944]" ], "var": [ "bizz" ] }, { "value": [ "[52, 592, 815, 21, 729, 898, 579, 146, 125, 69, 814, 593, 4, 373, 764, 136, 561, 433, 799, 185, 225, 238, 251, 201, 266, 691, 59, 568, 784, 848, 471, 133]" ], "var": [ "bizz" ] }, { "value": [ "[487, 835, 778, 78, 598, 15, 521, 69, 98, 631, 862, 870, 617, 311, 429, 57, 695, 589, 774, 61, 800, 377, 208, 388, 725, 278, 906, 978, 983, 569, 162, 229]" ], "var": [ "bizz" ] }, { "value": [ "[109, 545, 611, 190, 564, 136, 532, 310, 738, 45, 616, 742, 244, 718, 211, 510, 40, 306, 12, 949, 790, 532, 951, 542, 280, 989, 506, 548, 214, 664, 37, 669]" ], "var": [ "bizz" ] }, { "value": [ "[390, 903, 605, 705, 276, 949, 250, 363, 545, 935, 231, 398, 324, 441, 500, 63, 328, 42, 14, 129, 628, 873, 104, 903, 2, 382, 384, 817, 85, 266, 423, 671]" ], "var": [ "bizz" ] }, { "value": [ "[719, 54, 95, 489, 474, 138, 840, 374, 114, 18, 925, 908, 750, 624, 682, 971, 759, 649, 642, 217, 258, 616, 55, 962, 27, 798, 287, 890, 158, 745, 425, 894]" ], "var": [ "bizz" ] }, { "value": [ "[509, 512, 554, 522, 27, 316, 924, 286, 172, 191, 812, 949, 224, 975, 938, 719, 67, 331, 858, 322, 462, 531, 604, 349, 289, 495, 242, 592, 671, 846, 831, 955]" ], "var": [ "bizz" ] }, { "value": [ "[438, 828, 710, 760, 2, 112, 0, 113, 446, 1, 519, 414, 296, 154, 217, 371, 217, 736, 217, 791, 530, 568, 521, 955, 904, 265, 790, 315, 574, 567, 852, 546]" ], "var": [ "bizz" ] }, { "value": [ "[445, 417, 125, 722, 721, 680, 541, 52, 944, 681, 815, 629, 373, 907, 117, 649, 847, 999, 684, 239, 655, 68, 747, 561, 502, 325, 951, 67, 618, 728, 18, 635]" ], "var": [ "bizz" ] } ], "output": [ { "value": [ "[200, 837, 884, 519, 186, 23, 388, 797, 654, 574, 845, 988, 946, 959, 511, 287, 728, 715, 163, 208, 995, 423, 627, 321, 284, 28, 767, 668, 744, 51, 462, 326]", "988" ], "var": [ "bizz", "returnv" ] }, { "value": [ "[857, 97, 244, 959, 725, 966, 921, 917, 196, 12, 699, 985, 849, 139, 388, 776, 177, 610, 203, 894, 855, 376, 871, 389, 541, 213, 899, 983, 157, 482, 804, 944]", "985" ], "var": [ "bizz", "returnv" ] }, { "value": [ "[52, 592, 815, 21, 729, 898, 579, 146, 125, 69, 814, 593, 4, 373, 764, 136, 561, 433, 799, 185, 225, 238, 251, 201, 266, 691, 59, 568, 784, 848, 471, 133]", "593" ], "var": [ "bizz", "returnv" ] }, { "value": [ "[487, 835, 778, 78, 598, 15, 521, 69, 98, 631, 862, 870, 617, 311, 429, 57, 695, 589, 774, 61, 800, 377, 208, 388, 725, 278, 906, 978, 983, 569, 162, 229]", "870" ], "var": [ "bizz", "returnv" ] }, { "value": [ "[109, 545, 611, 190, 564, 136, 532, 310, 738, 45, 616, 742, 244, 718, 211, 510, 40, 306, 12, 949, 790, 532, 951, 542, 280, 989, 506, 548, 214, 664, 37, 669]", "742" ], "var": [ "bizz", "returnv" ] }, { "value": [ "[390, 903, 605, 705, 276, 949, 250, 363, 545, 935, 231, 398, 324, 441, 500, 63, 328, 42, 14, 129, 628, 873, 104, 903, 2, 382, 384, 817, 85, 266, 423, 671]", "398" ], "var": [ "bizz", "returnv" ] }, { "value": [ "[719, 54, 95, 489, 474, 138, 840, 374, 114, 18, 925, 908, 750, 624, 682, 971, 759, 649, 642, 217, 258, 616, 55, 962, 27, 798, 287, 890, 158, 745, 425, 894]", "908" ], "var": [ "bizz", "returnv" ] }, { "value": [ "[509, 512, 554, 522, 27, 316, 924, 286, 172, 191, 812, 949, 224, 975, 938, 719, 67, 331, 858, 322, 462, 531, 604, 349, 289, 495, 242, 592, 671, 846, 831, 955]", "949" ], "var": [ "bizz", "returnv" ] }, { "value": [ "[438, 828, 710, 760, 2, 112, 0, 113, 446, 1, 519, 414, 296, 154, 217, 371, 217, 736, 217, 791, 530, 568, 521, 955, 904, 265, 790, 315, 574, 567, 852, 546]", "414" ], "var": [ "bizz", "returnv" ] }, { "value": [ "[445, 417, 125, 722, 721, 680, 541, 52, 944, 681, 815, 629, 373, 907, 117, 649, 847, 999, 684, 239, 655, 68, 747, 561, 502, 325, 951, 67, 618, 728, 18, 635]", "629" ], "var": [ "bizz", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_60jc0mifk1.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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* bizz, unsigned int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { unsigned int output_temp_4 = bizz[i3]; output_temp_2.push_back(output_temp_4); } output_json["bizz"] = 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<unsigned int> input_temp_1_vec; for (auto& elem : input_json["bizz"]) { unsigned int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } unsigned int* bizz = &input_temp_1_vec[0]; clock_t begin = clock(); unsigned int(*casted_bizz)[10] = (unsigned int(*)[10])bizz; unsigned int returnv = fuzz(casted_bizz); bizz = (unsigned int(*))casted_bizz; clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(bizz, returnv); }
master
null
{"livein": ["bizz"], "liveout": ["bizz"], "returnvarname": ["returnv"], "execcmd": "", "funname": "fuzz", "funargs": ["bizz"], "typemap": {"bizz": "array(uint32#32)", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60jc0mifk1.c"], "classmap": {}, "range": {}, "needs_cast": {"bizz": {"old_type": "unsigned int", "new_type": "unsigned int", "dims": [[], [10]]}}, "globals": []}
JasonVann/ComputerArchitecture/15-213/lab/attacklab/farm.c
int end_farm() { return 1; }
int end_farm()
int end_farm()
end_farm
[ "int", "" ]
{ "code": [ ".globl end_farm\n.type end_farm, @function\nend_farm:\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 end_farm\n.type end_farm, @function\nend_farm:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl end_farm\n.type end_farm, @function\nend_farm:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global end_farm\n.type end_farm, %function\nend_farm:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global end_farm\n.type end_farm, %function\nend_farm:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global end_farm\n.type end_farm, %function\nend_farm:\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_54gmhz38zx.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = end_farm(); clock_t end = 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": "end_farm", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_54gmhz38zx.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
dietschreit/TeLaPo/src/observables.c
int int_distance2 (int (*atom1_ptr), int (*atom2_ptr)) { return ((atom1_ptr[0]-atom2_ptr[0])*(atom1_ptr[0]-atom2_ptr[0]) + (atom1_ptr[1]-atom2_ptr[1])*(atom1_ptr[1]-atom2_ptr[1]) + (atom1_ptr[2]-atom2_ptr[2])*(atom1_ptr[2]-atom2_ptr[2])); }
int int_distance2(intatom1_ptr)
int int_distance2 (int (*atom1_ptr), int (*atom2_ptr))
int_distance2
[ "int", "int" ]
{ "code": [ ".globl int_distance2\n.type int_distance2, @function\nint_distance2:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t%rsi, -16(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tmovl\t(%rax), %edx\n\tmovq\t-16(%rbp), %rax\n\tmovl\t(%rax), %eax\n\tmovl\t%edx, %ecx\n\tsubl\t%eax, %ecx\n\tmovq\t-8(%rbp), %rax\n\tmovl\t(%rax), %edx\n\tmovq\t-16(%rbp), %rax\n\tmovl\t(%rax), %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\timull\t%eax, %ecx\n\tmovl\t%ecx, %edx\n\tmovq\t-8(%rbp), %rax\n\taddq\t$4, %rax\n\tmovl\t(%rax), %ecx\n\tmovq\t-16(%rbp), %rax\n\taddq\t$4, %rax\n\tmovl\t(%rax), %eax\n\tmovl\t%ecx, %esi\n\tsubl\t%eax, %esi\n\tmovq\t-8(%rbp), %rax\n\taddq\t$4, %rax\n\tmovl\t(%rax), %ecx\n\tmovq\t-16(%rbp), %rax\n\taddq\t$4, %rax\n\tmovl\t(%rax), %eax\n\tsubl\t%eax, %ecx\n\tmovl\t%ecx, %eax\n\timull\t%esi, %eax\n\tleal\t(%rdx,%rax), %ecx\n\tmovq\t-8(%rbp), %rax\n\taddq\t$8, %rax\n\tmovl\t(%rax), %edx\n\tmovq\t-16(%rbp), %rax\n\taddq\t$8, %rax\n\tmovl\t(%rax), %eax\n\tmovl\t%edx, %esi\n\tsubl\t%eax, %esi\n\tmovq\t-8(%rbp), %rax\n\taddq\t$8, %rax\n\tmovl\t(%rax), %edx\n\tmovq\t-16(%rbp), %rax\n\taddq\t$8, %rax\n\tmovl\t(%rax), %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\timull\t%esi, %eax\n\taddl\t%ecx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl int_distance2\n.type int_distance2, @function\nint_distance2:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %edx\n\tmovl\t4(%rdi), %eax\n\tsubl\t(%rsi), %edx\n\tsubl\t4(%rsi), %eax\n\timull\t%eax, %eax\n\tmovl\t8(%rdi), %ecx\n\tsubl\t8(%rsi), %ecx\n\timull\t%edx, %edx\n\timull\t%ecx, %ecx\n\taddl\t%eax, %edx\n\tleal\t(%rdx,%rcx), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl int_distance2\n.type int_distance2, @function\nint_distance2:\n.LFB16:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %edx\n\tmovl\t4(%rdi), %eax\n\tsubl\t(%rsi), %edx\n\tsubl\t4(%rsi), %eax\n\timull\t%eax, %eax\n\tmovl\t8(%rdi), %ecx\n\tsubl\t8(%rsi), %ecx\n\timull\t%edx, %edx\n\timull\t%ecx, %ecx\n\taddl\t%eax, %edx\n\tleal\t(%rdx,%rcx), %eax\n\tret\n\t.cfi_endproc\n\n", ".global int_distance2\n.type int_distance2, %function\nint_distance2:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tldr\tx0, [sp, 8]\n\tldr\tw1, [x0]\n\tldr\tx0, [sp]\n\tldr\tw0, [x0]\n\tsub\tw1, w1, w0\n\tldr\tx0, [sp, 8]\n\tldr\tw2, [x0]\n\tldr\tx0, [sp]\n\tldr\tw0, [x0]\n\tsub\tw0, w2, w0\n\tmul\tw1, w1, w0\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 4\n\tldr\tw2, [x0]\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 4\n\tldr\tw0, [x0]\n\tsub\tw2, w2, w0\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 4\n\tldr\tw3, [x0]\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 4\n\tldr\tw0, [x0]\n\tsub\tw0, w3, w0\n\tmul\tw0, w2, w0\n\tadd\tw1, w1, w0\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 8\n\tldr\tw2, [x0]\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 8\n\tldr\tw0, [x0]\n\tsub\tw2, w2, w0\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 8\n\tldr\tw3, [x0]\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 8\n\tldr\tw0, [x0]\n\tsub\tw0, w3, w0\n\tmul\tw0, w2, w0\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global int_distance2\n.type int_distance2, %function\nint_distance2:\n.LFB11:\n\t.cfi_startproc\n\tldp\tw3, w4, [x1]\n\tldr\tw2, [x0]\n\tldr\tw1, [x1, 8]\n\tsub\tw2, w2, w3\n\tldp\tw3, w0, [x0, 4]\n\tsub\tw3, w3, w4\n\tsub\tw0, w0, w1\n\tmul\tw3, w3, w3\n\tmadd\tw2, w2, w2, w3\n\tmadd\tw0, w0, w0, w2\n\tret\n\t.cfi_endproc\n\n", ".global int_distance2\n.type int_distance2, %function\nint_distance2:\n.LFB16:\n\t.cfi_startproc\n\tldp\tw2, w3, [x0]\n\tldp\tw5, w4, [x1]\n\tldr\tw0, [x0, 8]\n\tsub\tw3, w3, w4\n\tldr\tw4, [x1, 8]\n\tsub\tw1, w2, w5\n\tsub\tw0, w0, w4\n\tmul\tw3, w3, w3\n\tmadd\tw1, w1, w1, w3\n\tmadd\tw0, w0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdlib.h> #include <math.h> /* for math stuff like cos, log, etc. */ # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[120, 5, 7, 27, 41, 12, 25, 93, 108, 49, 100, 56, 29, 94, 99, 108, 54, 123, 25, 45, 47, 115, 106, 109, 84, 106, 79, 30, 106, 125, 76, 122]", "[36, 94, 50, 15, 104, 54, 110, 36, 25, 81, 52, 16, 21, 124, 47, 21, 73, 48, 112, 112, 17, 8, 73, 93, 110, 86, 60, 15, 27, 107, 107, 0]" ], "var": [ "atom1_ptr", "atom2_ptr" ] }, { "value": [ "[93, 38, 102, 33, 69, 117, 31, 121, 82, 4, 108, 28, 36, 38, 3, 93, 57, 75, 61, 20, 35, 10, 99, 21, 1, 5, 10, 7, 97, 70, 28, 82]", "[7, 22, 40, 40, 40, 65, 121, 116, 29, 49, 68, 107, 77, 44, 33, 119, 26, 96, 73, 21, 73, 26, 125, 109, 34, 1, 34, 25, 44, 66, 91, 85]" ], "var": [ "atom1_ptr", "atom2_ptr" ] }, { "value": [ "[15, 108, 90, 101, 92, 80, 78, 84, 80, 85, 34, 83, 104, 57, 39, 45, 69, 74, 87, 47, 90, 69, 36, 69, 52, 98, 121, 47, 78, 115, 76, 54]", "[1, 21, 100, 27, 48, 106, 97, 101, 11, 34, 70, 37, 114, 82, 44, 14, 53, 101, 113, 103, 118, 41, 21, 75, 91, 72, 5, 55, 89, 29, 12, 81]" ], "var": [ "atom1_ptr", "atom2_ptr" ] }, { "value": [ "[51, 76, 8, 60, 78, 112, 49, 90, 122, 68, 42, 29, 69, 66, 123, 102, 40, 38, 37, 34, 39, 105, 13, 64, 62, 44, 83, 88, 118, 44, 17, 54]", "[81, 62, 64, 43, 29, 45, 84, 3, 52, 31, 46, 113, 51, 125, 39, 1, 123, 37, 118, 124, 64, 58, 38, 114, 97, 112, 27, 79, 14, 63, 6, 63]" ], "var": [ "atom1_ptr", "atom2_ptr" ] }, { "value": [ "[71, 63, 37, 21, 103, 16, 34, 98, 122, 67, 62, 1, 23, 2, 123, 21, 77, 84, 12, 40, 50, 122, 27, 3, 111, 27, 47, 3, 117, 61, 19, 84]", "[85, 111, 25, 18, 21, 59, 121, 41, 126, 22, 37, 5, 102, 67, 18, 123, 12, 117, 114, 30, 37, 113, 99, 63, 88, 78, 14, 92, 69, 70, 38, 81]" ], "var": [ "atom1_ptr", "atom2_ptr" ] }, { "value": [ "[37, 41, 25, 112, 61, 17, 34, 57, 125, 24, 119, 107, 16, 64, 43, 100, 114, 0, 108, 78, 107, 3, 77, 88, 98, 126, 17, 85, 56, 76, 14, 21]", "[96, 62, 55, 72, 8, 69, 103, 54, 12, 5, 79, 124, 36, 10, 33, 31, 58, 60, 84, 47, 107, 117, 89, 8, 47, 54, 94, 95, 104, 42, 87, 92]" ], "var": [ "atom1_ptr", "atom2_ptr" ] }, { "value": [ "[37, 59, 53, 65, 87, 47, 107, 117, 69, 6, 6, 35, 125, 123, 84, 28, 61, 52, 10, 39, 96, 21, 26, 107, 25, 124, 121, 6, 91, 28, 22, 35]", "[46, 36, 37, 120, 123, 67, 44, 31, 114, 51, 15, 67, 33, 0, 16, 60, 49, 98, 122, 87, 120, 112, 94, 60, 45, 52, 79, 20, 99, 112, 32, 119]" ], "var": [ "atom1_ptr", "atom2_ptr" ] }, { "value": [ "[90, 36, 97, 67, 21, 49, 10, 80, 1, 14, 42, 0, 18, 102, 86, 68, 100, 118, 13, 56, 3, 72, 19, 10, 48, 91, 13, 16, 74, 54, 94, 28]", "[3, 20, 27, 52, 33, 0, 87, 43, 14, 89, 115, 77, 22, 78, 89, 69, 95, 104, 39, 117, 84, 53, 70, 107, 126, 117, 74, 84, 107, 94, 90, 121]" ], "var": [ "atom1_ptr", "atom2_ptr" ] }, { "value": [ "[21, 35, 53, 112, 113, 61, 60, 51, 57, 10, 44, 50, 124, 77, 2, 107, 24, 39, 81, 84, 3, 35, 103, 50, 6, 76, 49, 8, 6, 85, 90, 104]", "[6, 62, 115, 31, 53, 70, 48, 19, 87, 108, 57, 86, 11, 86, 124, 15, 36, 0, 61, 119, 58, 37, 119, 44, 114, 105, 113, 0, 122, 0, 22, 67]" ], "var": [ "atom1_ptr", "atom2_ptr" ] }, { "value": [ "[39, 27, 75, 56, 120, 118, 78, 81, 1, 7, 126, 116, 54, 5, 9, 30, 78, 106, 32, 43, 107, 21, 65, 27, 29, 69, 63, 81, 113, 98, 54, 71]", "[54, 26, 35, 69, 56, 110, 67, 31, 89, 88, 117, 121, 48, 114, 12, 114, 81, 73, 86, 0, 96, 48, 98, 42, 111, 114, 26, 114, 94, 21, 42, 72]" ], "var": [ "atom1_ptr", "atom2_ptr" ] } ], "output": [ { "value": [ "[120, 5, 7, 27, 41, 12, 25, 93, 108, 49, 100, 56, 29, 94, 99, 108, 54, 123, 25, 45, 47, 115, 106, 109, 84, 106, 79, 30, 106, 125, 76, 122]", "[36, 94, 50, 15, 104, 54, 110, 36, 25, 81, 52, 16, 21, 124, 47, 21, 73, 48, 112, 112, 17, 8, 73, 93, 110, 86, 60, 15, 27, 107, 107, 0]", "16826" ], "var": [ "atom1_ptr", "atom2_ptr", "returnv" ] }, { "value": [ "[93, 38, 102, 33, 69, 117, 31, 121, 82, 4, 108, 28, 36, 38, 3, 93, 57, 75, 61, 20, 35, 10, 99, 21, 1, 5, 10, 7, 97, 70, 28, 82]", "[7, 22, 40, 40, 40, 65, 121, 116, 29, 49, 68, 107, 77, 44, 33, 119, 26, 96, 73, 21, 73, 26, 125, 109, 34, 1, 34, 25, 44, 66, 91, 85]", "11496" ], "var": [ "atom1_ptr", "atom2_ptr", "returnv" ] }, { "value": [ "[15, 108, 90, 101, 92, 80, 78, 84, 80, 85, 34, 83, 104, 57, 39, 45, 69, 74, 87, 47, 90, 69, 36, 69, 52, 98, 121, 47, 78, 115, 76, 54]", "[1, 21, 100, 27, 48, 106, 97, 101, 11, 34, 70, 37, 114, 82, 44, 14, 53, 101, 113, 103, 118, 41, 21, 75, 91, 72, 5, 55, 89, 29, 12, 81]", "7865" ], "var": [ "atom1_ptr", "atom2_ptr", "returnv" ] }, { "value": [ "[51, 76, 8, 60, 78, 112, 49, 90, 122, 68, 42, 29, 69, 66, 123, 102, 40, 38, 37, 34, 39, 105, 13, 64, 62, 44, 83, 88, 118, 44, 17, 54]", "[81, 62, 64, 43, 29, 45, 84, 3, 52, 31, 46, 113, 51, 125, 39, 1, 123, 37, 118, 124, 64, 58, 38, 114, 97, 112, 27, 79, 14, 63, 6, 63]", "4232" ], "var": [ "atom1_ptr", "atom2_ptr", "returnv" ] }, { "value": [ "[71, 63, 37, 21, 103, 16, 34, 98, 122, 67, 62, 1, 23, 2, 123, 21, 77, 84, 12, 40, 50, 122, 27, 3, 111, 27, 47, 3, 117, 61, 19, 84]", "[85, 111, 25, 18, 21, 59, 121, 41, 126, 22, 37, 5, 102, 67, 18, 123, 12, 117, 114, 30, 37, 113, 99, 63, 88, 78, 14, 92, 69, 70, 38, 81]", "2644" ], "var": [ "atom1_ptr", "atom2_ptr", "returnv" ] }, { "value": [ "[37, 41, 25, 112, 61, 17, 34, 57, 125, 24, 119, 107, 16, 64, 43, 100, 114, 0, 108, 78, 107, 3, 77, 88, 98, 126, 17, 85, 56, 76, 14, 21]", "[96, 62, 55, 72, 8, 69, 103, 54, 12, 5, 79, 124, 36, 10, 33, 31, 58, 60, 84, 47, 107, 117, 89, 8, 47, 54, 94, 95, 104, 42, 87, 92]", "4822" ], "var": [ "atom1_ptr", "atom2_ptr", "returnv" ] }, { "value": [ "[37, 59, 53, 65, 87, 47, 107, 117, 69, 6, 6, 35, 125, 123, 84, 28, 61, 52, 10, 39, 96, 21, 26, 107, 25, 124, 121, 6, 91, 28, 22, 35]", "[46, 36, 37, 120, 123, 67, 44, 31, 114, 51, 15, 67, 33, 0, 16, 60, 49, 98, 122, 87, 120, 112, 94, 60, 45, 52, 79, 20, 99, 112, 32, 119]", "866" ], "var": [ "atom1_ptr", "atom2_ptr", "returnv" ] }, { "value": [ "[90, 36, 97, 67, 21, 49, 10, 80, 1, 14, 42, 0, 18, 102, 86, 68, 100, 118, 13, 56, 3, 72, 19, 10, 48, 91, 13, 16, 74, 54, 94, 28]", "[3, 20, 27, 52, 33, 0, 87, 43, 14, 89, 115, 77, 22, 78, 89, 69, 95, 104, 39, 117, 84, 53, 70, 107, 126, 117, 74, 84, 107, 94, 90, 121]", "12725" ], "var": [ "atom1_ptr", "atom2_ptr", "returnv" ] }, { "value": [ "[21, 35, 53, 112, 113, 61, 60, 51, 57, 10, 44, 50, 124, 77, 2, 107, 24, 39, 81, 84, 3, 35, 103, 50, 6, 76, 49, 8, 6, 85, 90, 104]", "[6, 62, 115, 31, 53, 70, 48, 19, 87, 108, 57, 86, 11, 86, 124, 15, 36, 0, 61, 119, 58, 37, 119, 44, 114, 105, 113, 0, 122, 0, 22, 67]", "4798" ], "var": [ "atom1_ptr", "atom2_ptr", "returnv" ] }, { "value": [ "[39, 27, 75, 56, 120, 118, 78, 81, 1, 7, 126, 116, 54, 5, 9, 30, 78, 106, 32, 43, 107, 21, 65, 27, 29, 69, 63, 81, 113, 98, 54, 71]", "[54, 26, 35, 69, 56, 110, 67, 31, 89, 88, 117, 121, 48, 114, 12, 114, 81, 73, 86, 0, 96, 48, 98, 42, 111, 114, 26, 114, 94, 21, 42, 72]", "1826" ], "var": [ "atom1_ptr", "atom2_ptr", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_33l70802dc.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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* atom1_ptr, int* atom2_ptr, int returnv) { json output_json; std::vector<json> output_temp_3; for (unsigned int i4 = 0; i4 < 32; i4++) { int output_temp_5 = atom1_ptr[i4]; output_temp_3.push_back(output_temp_5); } output_json["atom1_ptr"] = output_temp_3; std::vector<json> output_temp_6; for (unsigned int i7 = 0; i7 < 32; i7++) { int output_temp_8 = atom2_ptr[i7]; output_temp_6.push_back(output_temp_8); } output_json["atom2_ptr"] = output_temp_6; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["atom1_ptr"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* atom1_ptr = &input_temp_1_vec[0]; std::vector<int> input_temp_2_vec; for (auto& elem : input_json["atom2_ptr"]) { int input_temp_2_inner = elem; input_temp_2_vec.push_back(input_temp_2_inner); } int* atom2_ptr = &input_temp_2_vec[0]; clock_t begin = clock(); int returnv = int_distance2(atom1_ptr, atom2_ptr); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(atom1_ptr, atom2_ptr, returnv); }
master
null
{"livein": ["atom1_ptr", "atom2_ptr"], "liveout": ["atom1_ptr", "atom2_ptr"], "returnvarname": ["returnv"], "execcmd": "", "funname": "int_distance2", "funargs": ["atom1_ptr", "atom2_ptr"], "typemap": {"atom1_ptr": "array(int32#32)", "atom2_ptr": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33l70802dc.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_432() { return 432; }
int do_432()
int do_432()
do_432
[ "int", "" ]
{ "code": [ ".globl do_432\n.type do_432, @function\ndo_432:\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$432, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_432\n.type do_432, @function\ndo_432:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$432, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_432\n.type do_432, @function\ndo_432:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$432, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_432\n.type do_432, %function\ndo_432:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 432\n\tret\n\t.cfi_endproc\n\n", ".global do_432\n.type do_432, %function\ndo_432:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 432\n\tret\n\t.cfi_endproc\n\n", ".global do_432\n.type do_432, %function\ndo_432:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 432\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "432" ], "var": [ "returnv" ] }, { "value": [ "432" ], "var": [ "returnv" ] }, { "value": [ "432" ], "var": [ "returnv" ] }, { "value": [ "432" ], "var": [ "returnv" ] }, { "value": [ "432" ], "var": [ "returnv" ] }, { "value": [ "432" ], "var": [ "returnv" ] }, { "value": [ "432" ], "var": [ "returnv" ] }, { "value": [ "432" ], "var": [ "returnv" ] }, { "value": [ "432" ], "var": [ "returnv" ] }, { "value": [ "432" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53w06vlxvg.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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_432(); clock_t end = 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_432", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53w06vlxvg.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
MU-Software/hs_c/1115/resident_id_checker.c
int isvalid_id(const char *input_str) { char tmp_charset[15] = { 0 }; int total = 0, magic_array[] = { 2, 3, 4, 5, 6, 7, 0, 8, 9, 2, 3, 4, 5 }; for (int i = 0; i<13; i++) if (input_str[i] >= 0) { tmp_charset[i] = input_str[i]*magic_array[i]; total += tmp_charset[i]; } if (11 - (total % 11) == input_str[13]) return 1; return 0; }
int isvalid_id(const char *input_str)
int isvalid_id(const char *input_str)
isvalid_id
[ "int", "const char *" ]
{ "code": [ ".globl isvalid_id\n.type isvalid_id, @function\nisvalid_id:\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$112, %rsp\n\tmovq\t%rdi, -104(%rbp)\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovq\t$0, -23(%rbp)\n\tmovl\t$0, -15(%rbp)\n\tmovw\t$0, -11(%rbp)\n\tmovb\t$0, -9(%rbp)\n\tmovl\t$0, -88(%rbp)\n\tmovl\t$2, -80(%rbp)\n\tmovl\t$3, -76(%rbp)\n\tmovl\t$4, -72(%rbp)\n\tmovl\t$5, -68(%rbp)\n\tmovl\t$6, -64(%rbp)\n\tmovl\t$7, -60(%rbp)\n\tmovl\t$0, -56(%rbp)\n\tmovl\t$8, -52(%rbp)\n\tmovl\t$9, -48(%rbp)\n\tmovl\t$2, -44(%rbp)\n\tmovl\t$3, -40(%rbp)\n\tmovl\t$4, -36(%rbp)\n\tmovl\t$5, -32(%rbp)\n\tmovl\t$0, -84(%rbp)\n\tjmp\t.L2\n.L4:\n\tmovl\t-84(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-104(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjs\t.L3\n\tmovl\t-84(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-104(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tmovl\t%eax, %ecx\n\tmovl\t-84(%rbp), %eax\n\tcltq\n\tmovl\t-80(%rbp,%rax,4), %eax\n\tmovl\t%eax, %edx\n\tmovl\t%ecx, %eax\n\timull\t%edx, %eax\n\tmovl\t%eax, %edx\n\tmovl\t-84(%rbp), %eax\n\tcltq\n\tmovb\t%dl, -23(%rbp,%rax)\n\tmovl\t-84(%rbp), %eax\n\tcltq\n\tmovzbl\t-23(%rbp,%rax), %eax\n\tmovsbl\t%al, %eax\n\taddl\t%eax, -88(%rbp)\n.L3:\n\taddl\t$1, -84(%rbp)\n.L2:\n\tcmpl\t$12, -84(%rbp)\n\tjle\t.L4\n\tmovl\t-88(%rbp), %ecx\n\tmovslq\t%ecx, %rax\n\timulq\t$780903145, %rax, %rax\n\tshrq\t$32, %rax\n\tmovl\t%eax, %edx\n\tsarl\t%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\taddl\t%edx, %eax\n\tsubl\t%eax, %ecx\n\tmovl\t%ecx, %edx\n\tmovl\t$11, %eax\n\tsubl\t%edx, %eax\n\tmovl\t%eax, %edx\n\tmovq\t-104(%rbp), %rax\n\taddq\t$13, %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tcmpl\t%eax, %edx\n\tjne\t.L5\n\tmovl\t$1, %eax\n\tjmp\t.L7\n.L5:\n\tmovl\t$0, %eax\n.L7:\n\tmovq\t-8(%rbp), %rsi\n\txorq\t%fs:40, %rsi\n\tje\t.L8\n\tcall\t__stack_chk_fail@PLT\n.L8:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl isvalid_id\n.type isvalid_id, @function\nisvalid_id:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$72, %rsp\n\t.cfi_def_cfa_offset 80\n\tmovq\t%rdi, %r8\n\tleaq\t.LC0(%rip), %rsi\n\txorl\t%edx, %edx\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 56(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t4(%rsp), %rdi\n\tmovl\t$13, %ecx\n\trep movsl\n\txorl\t%esi, %esi\n\tleaq\t4(%rsp), %rdi\n.L3:\n\tmovb\t(%r8,%rsi), %al\n\ttestb\t%al, %al\n\tjs\t.L2\n\timull\t(%rdi,%rsi,4), %eax\n\tmovsbl\t%al, %ecx\n\taddl\t%ecx, %edx\n.L2:\n\tincq\t%rsi\n\tcmpq\t$13, %rsi\n\tjne\t.L3\n\tmovl\t%edx, %eax\n\tmovl\t$11, %ecx\n\tcltd\n\tidivl\t%ecx\n\tmovsbl\t13(%r8), %eax\n\tsubl\t%edx, %ecx\n\tcmpl\t%eax, %ecx\n\tsete\t%al\n\tmovq\t56(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tmovzbl\t%al, %eax\n\tje\t.L4\n\tcall\t__stack_chk_fail@PLT\n.L4:\n\taddq\t$72, %rsp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t2\n", ".globl isvalid_id\n.type isvalid_id, @function\nisvalid_id:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$72, %rsp\n\t.cfi_def_cfa_offset 80\n\tmovdqa\t.LC0(%rip), %xmm0\n\txorl\t%edx, %edx\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 56(%rsp)\n\txorl\t%eax, %eax\n\tmovzbl\t(%rdi), %eax\n\tmovaps\t%xmm0, (%rsp)\n\tmovdqa\t.LC1(%rip), %xmm0\n\tmovaps\t%xmm0, 16(%rsp)\n\tmovdqa\t.LC2(%rip), %xmm0\n\tmovaps\t%xmm0, 32(%rsp)\n\ttestb\t%al, %al\n\tjs\t.L2\n\tmulb\t(%rsp)\n\tmovsbl\t%al, %edx\n.L2:\n\tmovzbl\t1(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L3\n\tmulb\t4(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L3:\n\tmovzbl\t2(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L4\n\tmulb\t8(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L4:\n\tmovzbl\t3(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L5\n\tmulb\t12(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L5:\n\tmovzbl\t4(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L6\n\tmulb\t16(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L6:\n\tmovzbl\t5(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L7\n\tmulb\t20(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L7:\n\tmovzbl\t6(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L8\n\tmulb\t24(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L8:\n\tmovzbl\t7(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L9\n\tmulb\t28(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L9:\n\tmovzbl\t8(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L10\n\tmulb\t32(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L10:\n\tmovzbl\t9(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L11\n\tmulb\t36(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L11:\n\tmovzbl\t10(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L12\n\tmulb\t40(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L12:\n\tmovzbl\t11(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L13\n\tmulb\t44(%rsp)\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L13:\n\tmovzbl\t12(%rdi), %eax\n\ttestb\t%al, %al\n\tjs\t.L14\n\tleal\t(%rax,%rax,4), %eax\n\tmovsbl\t%al, %eax\n\taddl\t%eax, %edx\n.L14:\n\tmovslq\t%edx, %rax\n\tmovl\t%edx, %ecx\n\timulq\t$780903145, %rax, %rax\n\tsarl\t$31, %ecx\n\tsarq\t$33, %rax\n\tsubl\t%ecx, %eax\n\tleal\t(%rax,%rax,4), %ecx\n\tleal\t(%rax,%rcx,2), %eax\n\tsubl\t%edx, %eax\n\tleal\t11(%rax), %edx\n\tmovsbl\t13(%rdi), %eax\n\tcmpl\t%eax, %edx\n\tsete\t%al\n\tmovq\t56(%rsp), %rsi\n\txorq\t%fs:40, %rsi\n\tmovzbl\t%al, %eax\n\tjne\t.L20\n\taddq\t$72, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 8\n\tret\n.L20:\n\t.cfi_restore_state\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n.LC0: \t.long\t2\n.LC2: \t.long\t9\n.LC1: \t.long\t6\n", ".global isvalid_id\n.type isvalid_id, %function\nisvalid_id:\n.LFB6:\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\tx29, sp\n\tstr\tx0, [sp, 24]\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 120]\n\tmov\tx1,0\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tldrh\tw0, [x0]\n\tstrh\tw0, [sp, 104]\n\tstr\txzr, [sp, 106]\n\tstr\twzr, [sp, 114]\n\tstrb\twzr, [sp, 118]\n\tstr\twzr, [sp, 40]\n\tadrp\tx0, .LC0\n\tadd\tx1, x0, :lo12:.LC0\n\tadd\tx0, sp, 48\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\tw1, [x1, 48]\n\tstr\tw1, [x0, 48]\n\tstr\twzr, [sp, 44]\n\tb\t.L2\n.L3:\n\tldrsw\tx0, [sp, 44]\n\tldr\tx1, [sp, 24]\n\tadd\tx0, x1, x0\n\tldrb\tw1, [x0]\n\tldrsw\tx0, [sp, 44]\n\tlsl\tx0, x0, 2\n\tadd\tx2, sp, 48\n\tldr\tw0, [x2, x0]\n\tand\tw0, w0, 255\n\tmul\tw0, w1, w0\n\tand\tw2, w0, 255\n\tldrsw\tx0, [sp, 44]\n\tadd\tx1, sp, 104\n\tstrb\tw2, [x1, x0]\n\tldrsw\tx0, [sp, 44]\n\tadd\tx1, sp, 104\n\tldrb\tw0, [x1, x0]\n\tmov\tw1, w0\n\tldr\tw0, [sp, 40]\n\tadd\tw0, w0, w1\n\tstr\tw0, [sp, 40]\n\tldr\tw0, [sp, 44]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 44]\n.L2:\n\tldr\tw0, [sp, 44]\n\tcmp\tw0, 12\n\tble\t.L3\n\tldr\tw1, [sp, 40]\n\tmov\tw0, 41705\n\tmovk\tw0, 0x2e8b, lsl 16\n\tsmull\tx0, w1, w0\n\tlsr\tx0, x0, 32\n\tasr\tw2, w0, 1\n\tasr\tw0, w1, 31\n\tsub\tw0, w2, w0\n\tmov\tw2, 11\n\tmul\tw0, w0, w2\n\tsub\tw0, w1, w0\n\tmov\tw1, 11\n\tsub\tw0, w1, w0\n\tldr\tx1, [sp, 24]\n\tadd\tx1, x1, 13\n\tldrb\tw1, [x1]\n\tcmp\tw0, w1\n\tbne\t.L4\n\tmov\tw0, 1\n\tb\t.L6\n.L4:\n\tmov\tw0, 0\n.L6:\n\tmov\tw1, w0\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 120]\n\tldr\tx3, [x0]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L7\n\tbl\t__stack_chk_fail\n.L7:\n\tmov\tw0, w1\n\tldp\tx29, x30, [sp], 128\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.word\t2\n.LC1: \t.string\t\"\"\n", ".global isvalid_id\n.type isvalid_id, %function\nisvalid_id:\n.LFB35:\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\tmov\tx2, 52\n\tmov\tx29, sp\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -80\n\t.cfi_offset 20, -72\n\tadrp\tx19, :got:__stack_chk_guard\n\tmov\tx20, x0\n\tldr\tx0, [x19, #:got_lo12:__stack_chk_guard]\n\tadd\tx3, sp, 32\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 88]\n\tmov\tx1,0\n\tmov\tx0, x3\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tbl\tmemcpy\n\tmov\tx3, x0\n\tmov\tx2, 0\n\tmov\tw0, 0\n.L2:\n\tldr\tw1, [x3, x2, lsl 2]\n\tldrb\tw4, [x20, x2]\n\tadd\tx2, x2, 1\n\tcmp\tx2, 13\n\tmul\tw1, w1, w4\n\tadd\tw0, w0, w1, uxtb\n\tbne\t.L2\n\tmov\tw1, 11\n\tldr\tx19, [x19, #:got_lo12:__stack_chk_guard]\n\tudiv\tw2, w0, w1\n\tmsub\tw0, w2, w1, w0\n\tsub\tw1, w1, w0\n\tldrb\tw0, [x20, 13]\n\tcmp\tw1, w0\n\tcset\tw0, eq\n\tldr\tx1, [sp, 88]\n\tldr\tx2, [x19]\n\tsubs\tx1, x1, x2\n\tmov\tx2, 0\n\tbeq\t.L3\n\tbl\t__stack_chk_fail\n.L3:\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx29, x30, [sp], 96\n\t.cfi_restore 30\n\t.cfi_restore 29\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 isvalid_id\n.type isvalid_id, %function\nisvalid_id:\n.LFB52:\n\t.cfi_startproc\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tstp\tx29, x30, [sp, -80]!\n\t.cfi_def_cfa_offset 80\n\t.cfi_offset 29, -80\n\t.cfi_offset 30, -72\n\tadrp\tx11, :got:__stack_chk_guard\n\tmov\tw2, 35747\n\tmov\tx29, sp\n\tldp\tx3, x4, [x1]\n\tstp\tx3, x4, [sp, 16]\n\tldrb\tw8, [x0]\n\tldrb\tw7, [x0, 1]\n\tmovk\tw2, 0xba2e, lsl 16\n\tldrb\tw4, [x0, 2]\n\tmov\tw9, 11\n\tldp\tw5, w12, [sp, 24]\n\tlsr\tx6, x3, 32\n\tmul\tw3, w3, w8\n\tldrb\tw15, [x0, 5]\n\tldr\tx13, [x1, 16]\n\tmul\tw6, w6, w7\n\tand\tw3, w3, 255\n\tldrb\tw7, [x0, 3]\n\tmul\tw5, w5, w4\n\tldrb\tw14, [x0, 6]\n\tadd\tw6, w3, w6, uxtb\n\tlsr\tx10, x13, 32\n\tldp\tx4, x3, [x1, 24]\n\tstr\tx4, [sp, 40]\n\tldrb\tw4, [x0, 4]\n\tmul\tw12, w12, w7\n\tldp\tw8, w7, [sp, 40]\n\tadd\tw5, w6, w5, uxtb\n\tldrb\tw17, [x0, 7]\n\tmul\tw10, w10, w15\n\tldr\tx11, [x11, #:got_lo12:__stack_chk_guard]\n\tmul\tw4, w13, w4\n\tldr\tx6, [x1, 40]\n\tstr\tx6, [sp, 56]\n\tldrb\tw16, [x0, 8]\n\tadd\tw12, w5, w12, uxtb\n\tldrb\tw15, [x0, 9]\n\tmul\tw8, w8, w14\n\tadd\tw4, w12, w4, uxtb\n\tldrb\tw14, [x0, 10]\n\tldr\tw5, [sp, 56]\n\tlsr\tx6, x3, 32\n\tldr\tx12, [x11]\n\tstr\tx12, [sp, 72]\n\tmov\tx12,0\n\tadd\tw10, w4, w10, uxtb\n\tmul\tw7, w7, w17\n\tstr\tx13, [sp, 32]\n\tldrb\tw12, [x0, 11]\n\tadd\tw8, w10, w8, uxtb\n\tldr\tw4, [sp, 60]\n\tmul\tw6, w6, w15\n\tldr\tw1, [x1, 48]\n\tmul\tw5, w5, w14\n\tldrb\tw10, [x0, 12]\n\tadd\tw7, w8, w7, uxtb\n\tstr\tx3, [sp, 48]\n\tmul\tw3, w3, w16\n\tmul\tw4, w4, w12\n\tadd\tw3, w7, w3, uxtb\n\tadd\tw3, w3, w6, uxtb\n\tldrb\tw6, [x0, 13]\n\tmul\tw0, w1, w10\n\tadd\tw1, w3, w5, uxtb\n\tadd\tw1, w1, w4, uxtb\n\tadd\tw1, w1, w0, uxtb\n\tumull\tx0, w1, w2\n\tlsr\tx0, x0, 35\n\tmsub\tw0, w0, w9, w1\n\tsub\tw0, w9, w0\n\tcmp\tw0, w6\n\tcset\tw0, eq\n\tldr\tx1, [sp, 72]\n\tldr\tx2, [x11]\n\tsubs\tx1, x1, x2\n\tmov\tx2, 0\n\tbne\t.L5\n\tldp\tx29, x30, [sp], 80\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 <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"kebfqitwim\"" ], "var": [ "input_str" ] }, { "value": [ "\"lwy\"" ], "var": [ "input_str" ] }, { "value": [ "\"tnerz\"" ], "var": [ "input_str" ] }, { "value": [ "\"jcdshtouzmkdgorttglxswsc\"" ], "var": [ "input_str" ] }, { "value": [ "\"bys\"" ], "var": [ "input_str" ] }, { "value": [ "\"tnxntdlhcqxrfkm\"" ], "var": [ "input_str" ] }, { "value": [ "\"w\"" ], "var": [ "input_str" ] }, { "value": [ "\"\"" ], "var": [ "input_str" ] }, { "value": [ "\"ufhiwxekvgvvmjoynturivjgjkvlg\"" ], "var": [ "input_str" ] }, { "value": [ "\"kcmlxsocgzdva\"" ], "var": [ "input_str" ] } ], "output": [ { "value": [ "\"kebfqitwim\"", "0" ], "var": [ "input_str", "returnv" ] }, { "value": [ "\"lwy\"", "0" ], "var": [ "input_str", "returnv" ] }, { "value": [ "\"tnerz\"", "0" ], "var": [ "input_str", "returnv" ] }, { "value": [ "\"jcdshtouzmkdgorttglxswsc\"", "0" ], "var": [ "input_str", "returnv" ] }, { "value": [ "\"bys\"", "0" ], "var": [ "input_str", "returnv" ] }, { "value": [ "\"tnxntdlhcqxrfkm\"", "0" ], "var": [ "input_str", "returnv" ] }, { "value": [ "\"w\"", "0" ], "var": [ "input_str", "returnv" ] }, { "value": [ "\"\"", "0" ], "var": [ "input_str", "returnv" ] }, { "value": [ "\"ufhiwxekvgvvmjoynturivjgjkvlg\"", "0" ], "var": [ "input_str", "returnv" ] }, { "value": [ "\"kcmlxsocgzdva\"", "0" ], "var": [ "input_str", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_30i03lkx1v.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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* input_str, int returnv) { json output_json; output_json["input_str"] = input_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* input_str = strdup(input_json["input_str"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = isvalid_id(input_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(input_str, returnv); }
master
null
{"livein": ["input_str"], "liveout": ["input_str"], "returnvarname": ["returnv"], "execcmd": "", "funname": "isvalid_id", "funargs": ["input_str"], "typemap": {"input_str": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_30i03lkx1v.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
robobenklein/gpg-pqcrypt/HyMES/workfactor.c
double binomial(int n, int k) { int i; double x = 1; for (i = 0; i < k; ++i) { x *= n - i; x /= k -i; } return x; }
double binomial(intn, intk)
double binomial(int n, int k)
binomial
[ "double", "int", "int" ]
{ "code": [ ".globl binomial\n.type binomial, @function\nbinomial:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tmovsd\t.LC0(%rip), %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovl\t$0, -12(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-20(%rbp), %eax\n\tsubl\t-12(%rbp), %eax\n\tcvtsi2sdl\t%eax, %xmm0\n\tmovsd\t-8(%rbp), %xmm1\n\tmulsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovl\t-24(%rbp), %eax\n\tsubl\t-12(%rbp), %eax\n\tcvtsi2sdl\t%eax, %xmm1\n\tmovsd\t-8(%rbp), %xmm0\n\tdivsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\taddl\t$1, -12(%rbp)\n.L2:\n\tmovl\t-12(%rbp), %eax\n\tcmpl\t-24(%rbp), %eax\n\tjl\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 binomial\n.type binomial, @function\nbinomial:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t.LC0(%rip), %xmm0\n\txorl\t%eax, %eax\n.L2:\n\tcmpl\t%esi, %eax\n\tjge\t.L5\n\tmovl\t%edi, %edx\n\tsubl\t%eax, %edx\n\tcvtsi2sdl\t%edx, %xmm1\n\tmovl\t%esi, %edx\n\tsubl\t%eax, %edx\n\tincl\t%eax\n\tmulsd\t%xmm1, %xmm0\n\tcvtsi2sdl\t%edx, %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tjmp\t.L2\n.L5:\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".globl binomial\n.type binomial, @function\nbinomial:\n.LFB16:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t.LC0(%rip), %xmm0\n\ttestl\t%esi, %esi\n\tjle\t.L4\n\tsubl\t%esi, %edi\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tleal\t(%rdi,%rsi), %eax\n\tpxor\t%xmm1, %xmm1\n\tcvtsi2sdl\t%eax, %xmm1\n\tmulsd\t%xmm1, %xmm0\n\tpxor\t%xmm1, %xmm1\n\tcvtsi2sdl\t%esi, %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tsubl\t$1, %esi\n\tjne\t.L3\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".global binomial\n.type binomial, %function\nbinomial:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tfmov\td0, 1.0e+0\n\tstr\td0, [sp, 24]\n\tstr\twzr, [sp, 20]\n\tb\t.L2\n.L3:\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 20]\n\tsub\tw0, w1, w0\n\tscvtf\td0, w0\n\tldr\td1, [sp, 24]\n\tfmul\td0, d1, d0\n\tstr\td0, [sp, 24]\n\tldr\tw1, [sp, 8]\n\tldr\tw0, [sp, 20]\n\tsub\tw0, w1, w0\n\tscvtf\td0, w0\n\tldr\td1, [sp, 24]\n\tfdiv\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, 8]\n\tcmp\tw1, w0\n\tblt\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 binomial\n.type binomial, %function\nbinomial:\n.LFB11:\n\t.cfi_startproc\n\tfmov\td0, 1.0e+0\n\tmov\tw2, 0\n.L2:\n\tcmp\tw2, w1\n\tblt\t.L3\n\tret\n.L3:\n\tsub\tw3, w0, w2\n\tscvtf\td1, w3\n\tsub\tw3, w1, w2\n\tadd\tw2, w2, 1\n\tfmul\td0, d1, d0\n\tscvtf\td1, w3\n\tfdiv\td0, d0, d1\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global binomial\n.type binomial, %function\nbinomial:\n.LFB16:\n\t.cfi_startproc\n\tcmp\tw1, 0\n\tfmov\td0, 1.0e+0\n\tble\t.L1\n\tsub\tw2, w0, w1\n\t.p2align 3,,7\n.L3:\n\tadd\tw0, w2, w1\n\tscvtf\td2, w1\n\tsubs\tw1, w1, #1\n\tscvtf\td1, w0\n\tfmul\td0, d1, d0\n\tfdiv\td0, d0, d2\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 <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": [ "28", "115" ], "var": [ "n", "k" ] }, { "value": [ "24", "34" ], "var": [ "n", "k" ] }, { "value": [ "122", "120" ], "var": [ "n", "k" ] }, { "value": [ "114", "121" ], "var": [ "n", "k" ] }, { "value": [ "74", "58" ], "var": [ "n", "k" ] }, { "value": [ "55", "25" ], "var": [ "n", "k" ] }, { "value": [ "67", "7" ], "var": [ "n", "k" ] }, { "value": [ "124", "124" ], "var": [ "n", "k" ] }, { "value": [ "74", "6" ], "var": [ "n", "k" ] }, { "value": [ "90", "17" ], "var": [ "n", "k" ] } ], "output": [ { "value": [ "0.0" ], "var": [ "returnv" ] }, { "value": [ "-0.0" ], "var": [ "returnv" ] }, { "value": [ "7380.999999999999" ], "var": [ "returnv" ] }, { "value": [ "0.0" ], "var": [ "returnv" ] }, { "value": [ "6726037425812438.0" ], "var": [ "returnv" ] }, { "value": [ "3085851035479212.0" ], "var": [ "returnv" ] }, { "value": [ "869648208.0" ], "var": [ "returnv" ] }, { "value": [ "1.0" ], "var": [ "returnv" ] }, { "value": [ "185250786.0" ], "var": [ "returnv" ] }, { "value": [ "9.344337886130792e+17" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_61dbrjbuo9.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 k, 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"]; int k = input_json["k"]; clock_t begin = clock(); double returnv = binomial(n, k); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, k, returnv); }
master
null
{"livein": ["n", "k"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "binomial", "funargs": ["n", "k"], "typemap": {"n": "int32", "k": "int32", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_61dbrjbuo9.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ihh/dart/src/Weighbor/matrix.c
double RECT(double a) { return( a>0.0 ? a : 0.0); }
double RECT(doublea)
double RECT(double a)
RECT
[ "double", "double" ]
{ "code": [ ".globl RECT\n.type RECT, @function\nRECT:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t-8(%rbp), %xmm0\n\tpxor\t%xmm1, %xmm1\n\tcomisd\t%xmm1, %xmm0\n\tjbe\t.L7\n\tmovsd\t-8(%rbp), %xmm0\n\tjmp\t.L5\n.L7:\n\tpxor\t%xmm0, %xmm0\n.L5:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl RECT\n.type RECT, @function\nRECT:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\txorps\t%xmm1, %xmm1\n\tcomisd\t%xmm1, %xmm0\n\tja\t.L2\n\tmovapd\t%xmm1, %xmm0\n.L2:\n\tret\n\t.cfi_endproc\n\n", ".globl RECT\n.type RECT, @function\nRECT:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmaxsd\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".global RECT\n.type RECT, %function\nRECT:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tldr\td0, [sp, 8]\n\tfcmpe\td0, #0.0\n\tble\t.L7\n\tldr\td0, [sp, 8]\n\tb\t.L5\n.L7:\n\tmovi\td0, #0\n.L5:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global RECT\n.type RECT, %function\nRECT:\n.LFB24:\n\t.cfi_startproc\n\tfcmpe\td0, #0.0\n\tmovi\td1, #0\n\tfcsel\td0, d0, d1, gt\n\tret\n\t.cfi_endproc\n\n", ".global RECT\n.type RECT, %function\nRECT:\n.LFB39:\n\t.cfi_startproc\n\tmovi\td1, #0\n\tfcmpe\td0, d1\n\tfcsel\td0, d0, d1, 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 <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": [ "28.799848588" ], "var": [ "a" ] }, { "value": [ "89.9263563471" ], "var": [ "a" ] }, { "value": [ "67.5150014093" ], "var": [ "a" ] }, { "value": [ "92.1935082535" ], "var": [ "a" ] }, { "value": [ "56.797202439" ], "var": [ "a" ] }, { "value": [ "8.36650991659" ], "var": [ "a" ] }, { "value": [ "0.0681643837322" ], "var": [ "a" ] }, { "value": [ "93.49794809" ], "var": [ "a" ] }, { "value": [ "10.414926295" ], "var": [ "a" ] }, { "value": [ "54.2389876143" ], "var": [ "a" ] } ], "output": [ { "value": [ "28.799848588" ], "var": [ "returnv" ] }, { "value": [ "89.9263563471" ], "var": [ "returnv" ] }, { "value": [ "67.5150014093" ], "var": [ "returnv" ] }, { "value": [ "92.1935082535" ], "var": [ "returnv" ] }, { "value": [ "56.797202439" ], "var": [ "returnv" ] }, { "value": [ "8.36650991659" ], "var": [ "returnv" ] }, { "value": [ "0.0681643837322" ], "var": [ "returnv" ] }, { "value": [ "93.49794809" ], "var": [ "returnv" ] }, { "value": [ "10.414926295" ], "var": [ "returnv" ] }, { "value": [ "54.2389876143" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_451q6k_vx0.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = RECT(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": "RECT", "funargs": ["a"], "typemap": {"a": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_451q6k_vx0.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
rofirrim/gcc-plugins/07_walk_gimple/test.c
int g() { int ret = 0; goto out; ret = 1; out: return ret; }
int g()
int g()
g
[ "int", "" ]
{ "code": [ ".globl g\n.type g, @function\ng:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$0, -4(%rbp)\n\tnop\n.L2:\n\tendbr64\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl g\n.type g, @function\ng:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl g\n.type g, @function\ng:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global g\n.type g, %function\ng:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\twzr, [sp, 12]\n\tnop\n.L2:\n\tldr\tw0, [sp, 12]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global g\n.type g, %function\ng:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global g\n.type g, %function\ng:\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_44w5gn048t.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = g(); clock_t end = 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": "g", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_44w5gn048t.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
hellobbn/C-X_NEW/CProgDesign/2790.c
int TransStste(int x, int y, int size) { return x * size + y; }
int TransStste(intx, inty, intsize)
int TransStste(int x, int y, int size)
TransStste
[ "int", "int", "int", "int" ]
{ "code": [ ".globl TransStste\n.type TransStste, @function\nTransStste:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t%edx, -12(%rbp)\n\tmovl\t-4(%rbp), %eax\n\timull\t-12(%rbp), %eax\n\tmovl\t%eax, %edx\n\tmovl\t-8(%rbp), %eax\n\taddl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl TransStste\n.type TransStste, @function\nTransStste:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\timull\t%edx, %edi\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl TransStste\n.type TransStste, @function\nTransStste:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\timull\t%edx, %edi\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global TransStste\n.type TransStste, %function\nTransStste:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tstr\tw2, [sp, 4]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 4]\n\tmul\tw1, w1, w0\n\tldr\tw0, [sp, 8]\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global TransStste\n.type TransStste, %function\nTransStste:\n.LFB24:\n\t.cfi_startproc\n\tmadd\tw0, w0, w2, w1\n\tret\n\t.cfi_endproc\n\n", ".global TransStste\n.type TransStste, %function\nTransStste:\n.LFB39:\n\t.cfi_startproc\n\tmadd\tw0, w0, w2, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <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": [ "73", "59", "13" ], "var": [ "x", "y", "size" ] }, { "value": [ "6", "45", "111" ], "var": [ "x", "y", "size" ] }, { "value": [ "45", "98", "87" ], "var": [ "x", "y", "size" ] }, { "value": [ "108", "36", "55" ], "var": [ "x", "y", "size" ] }, { "value": [ "95", "31", "72" ], "var": [ "x", "y", "size" ] }, { "value": [ "73", "94", "102" ], "var": [ "x", "y", "size" ] }, { "value": [ "116", "86", "79" ], "var": [ "x", "y", "size" ] }, { "value": [ "28", "35", "119" ], "var": [ "x", "y", "size" ] }, { "value": [ "34", "105", "80" ], "var": [ "x", "y", "size" ] }, { "value": [ "45", "86", "80" ], "var": [ "x", "y", "size" ] } ], "output": [ { "value": [ "1008" ], "var": [ "returnv" ] }, { "value": [ "711" ], "var": [ "returnv" ] }, { "value": [ "4013" ], "var": [ "returnv" ] }, { "value": [ "5976" ], "var": [ "returnv" ] }, { "value": [ "6871" ], "var": [ "returnv" ] }, { "value": [ "7540" ], "var": [ "returnv" ] }, { "value": [ "9250" ], "var": [ "returnv" ] }, { "value": [ "3367" ], "var": [ "returnv" ] }, { "value": [ "2825" ], "var": [ "returnv" ] }, { "value": [ "3686" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_32gt17spvo.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 size, 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"]; int size = input_json["size"]; clock_t begin = clock(); int returnv = TransStste(x, y, 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(x, y, size, returnv); }
master
null
{"livein": ["x", "y", "size"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "TransStste", "funargs": ["x", "y", "size"], "typemap": {"x": "int32", "y": "int32", "size": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32gt17spvo.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
dspinellis/cscout/src/test/c/c08-partial_identifiers.c
int int_sub(int a, int b) { return a - b; }
int int_sub(inta, intb)
int int_sub(int a, int b)
int_sub
[ "int", "int", "int" ]
{ "code": [ ".globl int_sub\n.type int_sub, @function\nint_sub:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsubl\t-8(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl int_sub\n.type int_sub, @function\nint_sub:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tsubl\t%esi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl int_sub\n.type int_sub, @function\nint_sub:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tsubl\t%esi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global int_sub\n.type int_sub, %function\nint_sub:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tsub\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global int_sub\n.type int_sub, %function\nint_sub:\n.LFB13:\n\t.cfi_startproc\n\tsub\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global int_sub\n.type int_sub, %function\nint_sub:\n.LFB23:\n\t.cfi_startproc\n\tsub\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#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": [ "65", "75" ], "var": [ "a", "b" ] }, { "value": [ "97", "112" ], "var": [ "a", "b" ] }, { "value": [ "60", "120" ], "var": [ "a", "b" ] }, { "value": [ "79", "89" ], "var": [ "a", "b" ] }, { "value": [ "117", "79" ], "var": [ "a", "b" ] }, { "value": [ "87", "26" ], "var": [ "a", "b" ] }, { "value": [ "56", "71" ], "var": [ "a", "b" ] }, { "value": [ "47", "37" ], "var": [ "a", "b" ] }, { "value": [ "64", "122" ], "var": [ "a", "b" ] }, { "value": [ "71", "47" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "-10" ], "var": [ "returnv" ] }, { "value": [ "-15" ], "var": [ "returnv" ] }, { "value": [ "-60" ], "var": [ "returnv" ] }, { "value": [ "-10" ], "var": [ "returnv" ] }, { "value": [ "38" ], "var": [ "returnv" ] }, { "value": [ "61" ], "var": [ "returnv" ] }, { "value": [ "-15" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "-58" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_52hatmvqkf.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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_sub(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_sub", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_52hatmvqkf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Nakrez/ucc/tests/ucc/bind/good/fun-with-args-2.c
int fun(int a) { return a; }
int fun(inta)
int fun(int a)
fun
[ "int", "int" ]
{ "code": [ ".globl fun\n.type fun, @function\nfun:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\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 fun\n.type fun, @function\nfun:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl fun\n.type fun, @function\nfun:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global fun\n.type fun, %function\nfun:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\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 fun\n.type fun, %function\nfun:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global fun\n.type fun, %function\nfun:\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": [ "a" ] }, { "value": [ "5" ], "var": [ "a" ] }, { "value": [ "112" ], "var": [ "a" ] }, { "value": [ "103" ], "var": [ "a" ] }, { "value": [ "107" ], "var": [ "a" ] }, { "value": [ "59" ], "var": [ "a" ] }, { "value": [ "23" ], "var": [ "a" ] }, { "value": [ "22" ], "var": [ "a" ] }, { "value": [ "53" ], "var": [ "a" ] }, { "value": [ "46" ], "var": [ "a" ] } ], "output": [ { "value": [ "34" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "112" ], "var": [ "returnv" ] }, { "value": [ "103" ], "var": [ "returnv" ] }, { "value": [ "107" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "22" ], "var": [ "returnv" ] }, { "value": [ "53" ], "var": [ "returnv" ] }, { "value": [ "46" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_519tabqu8r.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = fun(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": "fun", "funargs": ["a"], "typemap": {"a": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_519tabqu8r.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
morningsend/zkernel/libc/string.c
char* skip_char_match_replace(char ch, char* str,char replace){ while(*str != '\0' && *str == ch){ *str = replace; str++; } return str; }
char * skip_char_match_replace(charch, char *str, charreplace)
char* skip_char_match_replace(char ch, char* str,char replace)
skip_char_match_replace
[ "char *", "char", "char *", "char" ]
{ "code": [ ".globl skip_char_match_replace\n.type skip_char_match_replace, @function\nskip_char_match_replace:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %ecx\n\tmovq\t%rsi, -16(%rbp)\n\tmovl\t%edx, %eax\n\tmovl\t%ecx, %edx\n\tmovb\t%dl, -4(%rbp)\n\tmovb\t%al, -8(%rbp)\n\tjmp\t.L2\n.L4:\n\tmovq\t-16(%rbp), %rax\n\tmovzbl\t-8(%rbp), %edx\n\tmovb\t%dl, (%rax)\n\taddq\t$1, -16(%rbp)\n.L2:\n\tmovq\t-16(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L3\n\tmovq\t-16(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, -4(%rbp)\n\tje\t.L4\n.L3:\n\tmovq\t-16(%rbp), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl skip_char_match_replace\n.type skip_char_match_replace, @function\nskip_char_match_replace:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rsi, %rax\n.L2:\n\tmovb\t(%rax), %cl\n\tcmpb\t%dil, %cl\n\tjne\t.L1\n\ttestb\t%cl, %cl\n\tje\t.L1\n\tmovb\t%dl, (%rax)\n\tincq\t%rax\n\tjmp\t.L2\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl skip_char_match_replace\n.type skip_char_match_replace, @function\nskip_char_match_replace:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rsi, %rax\n\tmovl\t%edi, %esi\n\tmovzbl\t(%rax), %ecx\n\tcmpb\t%dil, %cl\n\tje\t.L15\n\tjmp\t.L2\n\t.p2align 4,,10\n\t.p2align 3\n.L17:\n\tmovb\t%dl, (%rax)\n\tmovzbl\t1(%rax), %ecx\n\taddq\t$1, %rax\n\tcmpb\t%sil, %cl\n\tjne\t.L2\n.L15:\n\ttestb\t%cl, %cl\n\tjne\t.L17\n.L2:\n\tret\n\t.cfi_endproc\n\n", ".global skip_char_match_replace\n.type skip_char_match_replace, %function\nskip_char_match_replace:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tstr\tx1, [sp]\n\tstrb\tw2, [sp, 14]\n\tb\t.L2\n.L4:\n\tldr\tx0, [sp]\n\tldrb\tw1, [sp, 14]\n\tstrb\tw1, [x0]\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\tbeq\t.L3\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tldrb\tw1, [sp, 15]\n\tcmp\tw1, w0\n\tbeq\t.L4\n.L3:\n\tldr\tx0, [sp]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global skip_char_match_replace\n.type skip_char_match_replace, %function\nskip_char_match_replace:\n.LFB0:\n\t.cfi_startproc\n\tand\tw3, w0, 255\n\tand\tw2, w2, 255\n\tmov\tx0, x1\n.L2:\n\tldrb\tw1, [x0]\n\tcbz\tw1, .L1\n\tcmp\tw1, w3\n\tbeq\t.L4\n.L1:\n\tret\n.L4:\n\tstrb\tw2, [x0], 1\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global skip_char_match_replace\n.type skip_char_match_replace, %function\nskip_char_match_replace:\n.LFB0:\n\t.cfi_startproc\n\tand\tw3, w0, 255\n\tmov\tx0, x1\n\tldrb\tw1, [x1]\n\tand\tw2, w2, 255\n\tcmp\tw1, 0\n\tccmp\tw3, w1, 0, ne\n\tbne\t.L2\n\t.p2align 3,,7\n.L3:\n\tstrb\tw2, [x0]\n\tldrb\tw1, [x0, 1]!\n\tcmp\tw1, 0\n\tccmp\tw1, w3, 0, ne\n\tbeq\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": [ "37", "\"sihrhioehzc\"", "39" ], "var": [ "ch", "str", "replace" ] }, { "value": [ "84", "\"sfipqmqsakmexkgyk\"", "90" ], "var": [ "ch", "str", "replace" ] }, { "value": [ "109", "\"oddwfpxxxaxmkltsfteffpnpbpcj\"", "54" ], "var": [ "ch", "str", "replace" ] }, { "value": [ "17", "\"frxhkmblqznhefjy\"", "52" ], "var": [ "ch", "str", "replace" ] }, { "value": [ "40", "\"mtgpynjguhotdqo\"", "83" ], "var": [ "ch", "str", "replace" ] }, { "value": [ "61", "\"cfzoapirgulwk\"", "7" ], "var": [ "ch", "str", "replace" ] }, { "value": [ "68", "\"przmlxggdhjnrdvyqbghn\"", "23" ], "var": [ "ch", "str", "replace" ] }, { "value": [ "90", "\"bebndswfspozzea\"", "5" ], "var": [ "ch", "str", "replace" ] }, { "value": [ "111", "\"slbobxcgvvdmofglokkbmnilimd\"", "53" ], "var": [ "ch", "str", "replace" ] }, { "value": [ "67", "\"hsxp\"", "47" ], "var": [ "ch", "str", "replace" ] } ], "output": [ { "value": [ "\"sihrhioehzc\"", "\"sihrhioehzc\"" ], "var": [ "returnv", "str" ] }, { "value": [ "\"sfipqmqsakmexkgyk\"", "\"sfipqmqsakmexkgyk\"" ], "var": [ "returnv", "str" ] }, { "value": [ "\"oddwfpxxxaxmkltsfteffpnpbpcj\"", "\"oddwfpxxxaxmkltsfteffpnpbpcj\"" ], "var": [ "returnv", "str" ] }, { "value": [ "\"frxhkmblqznhefjy\"", "\"frxhkmblqznhefjy\"" ], "var": [ "returnv", "str" ] }, { "value": [ "\"mtgpynjguhotdqo\"", "\"mtgpynjguhotdqo\"" ], "var": [ "returnv", "str" ] }, { "value": [ "\"cfzoapirgulwk\"", "\"cfzoapirgulwk\"" ], "var": [ "returnv", "str" ] }, { "value": [ "\"przmlxggdhjnrdvyqbghn\"", "\"przmlxggdhjnrdvyqbghn\"" ], "var": [ "returnv", "str" ] }, { "value": [ "\"bebndswfspozzea\"", "\"bebndswfspozzea\"" ], "var": [ "returnv", "str" ] }, { "value": [ "\"slbobxcgvvdmofglokkbmnilimd\"", "\"slbobxcgvvdmofglokkbmnilimd\"" ], "var": [ "returnv", "str" ] }, { "value": [ "\"hsxp\"", "\"hsxp\"" ], "var": [ "returnv", "str" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_405q6ql1ix.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char ch, char* str, char replace, char* 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 ch = input_json["ch"].get<char>(); char* str = strdup(input_json["str"].get<std::string>().c_str()); char replace = input_json["replace"].get<char>(); clock_t begin = clock(); char* returnv = skip_char_match_replace(ch, str, replace); clock_t end = 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, str, replace, returnv); }
master
null
{"livein": ["ch", "str", "replace"], "liveout": ["str"], "returnvarname": ["returnv"], "execcmd": "", "funname": "skip_char_match_replace", "funargs": ["ch", "str", "replace"], "typemap": {"ch": "int8", "str": "string", "replace": "int8", "returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_405q6ql1ix.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
wuxingyu1983/HackerRank/MorganAndAString/main.c
int getNextDiff(char s[], int index) { int ret = index + 1; while (s[ret]) { if (s[ret] != s[index]) { break; } ret ++; } return ret; }
int getNextDiff(char *s, intindex)
int getNextDiff(char s[], int index)
getNextDiff
[ "int", "char *", "int" ]
{ "code": [ ".globl getNextDiff\n.type getNextDiff, @function\ngetNextDiff:\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-28(%rbp), %eax\n\taddl\t$1, %eax\n\tmovl\t%eax, -4(%rbp)\n\tjmp\t.L2\n.L5:\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), %edx\n\tmovl\t-28(%rbp), %eax\n\tmovslq\t%eax, %rcx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rcx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, %dl\n\tjne\t.L7\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.L5\n\tjmp\t.L4\n.L7:\n\tnop\n.L4:\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl getNextDiff\n.type getNextDiff, @function\ngetNextDiff:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rsi), %eax\n\tmovslq\t%esi, %rsi\n\tcltq\n.L2:\n\tmovb\t(%rdi,%rax), %dl\n\tmovl\t%eax, %r8d\n\ttestb\t%dl, %dl\n\tje\t.L1\n\tincq\t%rax\n\tcmpb\t%dl, (%rdi,%rsi)\n\tje\t.L2\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl getNextDiff\n.type getNextDiff, @function\ngetNextDiff:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rsi), %r8d\n\tmovslq\t%r8d, %rax\n\tmovzbl\t(%rdi,%rax), %edx\n\ttestb\t%dl, %dl\n\tje\t.L1\n\tmovslq\t%esi, %rsi\n\tmovzbl\t(%rdi,%rsi), %ecx\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L9:\n\tleal\t1(%rax), %r8d\n\taddq\t$1, %rax\n\tmovzbl\t(%rdi,%rax), %edx\n\ttestb\t%dl, %dl\n\tje\t.L1\n.L3:\n\tmovl\t%eax, %r8d\n\tcmpb\t%dl, %cl\n\tje\t.L9\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".global getNextDiff\n.type getNextDiff, %function\ngetNextDiff:\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\tldr\tw0, [sp, 4]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n\tb\t.L2\n.L5:\n\tldrsw\tx0, [sp, 28]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw1, [x0]\n\tldrsw\tx0, [sp, 4]\n\tldr\tx2, [sp, 8]\n\tadd\tx0, x2, x0\n\tldrb\tw0, [x0]\n\tcmp\tw1, w0\n\tbne\t.L7\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.L5\n\tb\t.L4\n.L7:\n\tnop\n.L4:\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global getNextDiff\n.type getNextDiff, %function\ngetNextDiff:\n.LFB35:\n\t.cfi_startproc\n\tadd\tw2, w1, 1\n\tmov\tx3, x0\n\tsxtw\tx1, w1\n\tsxtw\tx2, w2\n.L2:\n\tldrb\tw4, [x3, x2]\n\tmov\tw0, w2\n\tcbz\tw4, .L1\n\tldrb\tw5, [x3, x1]\n\tadd\tx2, x2, 1\n\tcmp\tw5, w4\n\tbeq\t.L2\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global getNextDiff\n.type getNextDiff, %function\ngetNextDiff:\n.LFB50:\n\t.cfi_startproc\n\tmov\tx4, x0\n\tadd\tw0, w1, 1\n\tldrb\tw3, [x4, w0, sxtw]\n\tcbz\tw3, .L1\n\tadd\tw2, w1, 2\n\tldrb\tw5, [x4, w1, sxtw]\n\tsub\tx4, x4, #1\n\tsxtw\tx1, w2\n\tb\t.L3\n\t.p2align 2,,3\n.L9:\n\tmov\tw0, w1\n\tadd\tx1, x1, 1\n\tldrb\tw3, [x4, x1]\n\tcbz\tw3, .L1\n.L3:\n\tcmp\tw5, w3\n\tsub\tw0, w1, #1\n\tbeq\t.L9\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 <string.h> #include <math.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"oojhtlwpupogqi\"", "91" ], "var": [ "s", "index" ] }, { "value": [ "\"xmkdqhh\"", "103" ], "var": [ "s", "index" ] }, { "value": [ "\"qqdxfbysbnggmizaqqwbalp\"", "24" ], "var": [ "s", "index" ] }, { "value": [ "\"qjlshaziz\"", "15" ], "var": [ "s", "index" ] }, { "value": [ "\"lwyirrkmsrseemyjvvrptebhai\"", "28" ], "var": [ "s", "index" ] }, { "value": [ "\"yjbqjebbomudqr\"", "12" ], "var": [ "s", "index" ] }, { "value": [ "\"lsmp\"", "116" ], "var": [ "s", "index" ] }, { "value": [ "\"jlyvihhlndbicjdftlsiwwptza\"", "97" ], "var": [ "s", "index" ] }, { "value": [ "\"yaemaodgqemksevrzx\"", "66" ], "var": [ "s", "index" ] }, { "value": [ "\"\"", "89" ], "var": [ "s", "index" ] } ], "output": [ { "value": [ "92", "\"oojhtlwpupogqi\"" ], "var": [ "returnv", "s" ] }, { "value": [ "104", "\"xmkdqhh\"" ], "var": [ "returnv", "s" ] }, { "value": [ "25", "\"qqdxfbysbnggmizaqqwbalp\"" ], "var": [ "returnv", "s" ] }, { "value": [ "16", "\"qjlshaziz\"" ], "var": [ "returnv", "s" ] }, { "value": [ "29", "\"lwyirrkmsrseemyjvvrptebhai\"" ], "var": [ "returnv", "s" ] }, { "value": [ "13", "\"yjbqjebbomudqr\"" ], "var": [ "returnv", "s" ] }, { "value": [ "117", "\"lsmp\"" ], "var": [ "returnv", "s" ] }, { "value": [ "98", "\"jlyvihhlndbicjdftlsiwwptza\"" ], "var": [ "returnv", "s" ] }, { "value": [ "67", "\"yaemaodgqemksevrzx\"" ], "var": [ "returnv", "s" ] }, { "value": [ "90", "\"\"" ], "var": [ "returnv", "s" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_50k61ztm0v.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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, int index, 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()); int index = input_json["index"]; clock_t begin = clock(); int returnv = getNextDiff(s, index); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(s, index, returnv); }
master
null
{"livein": ["s", "index"], "liveout": ["s"], "returnvarname": ["returnv"], "execcmd": "", "funname": "getNextDiff", "funargs": ["s", "index"], "typemap": {"s": "string", "index": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_50k61ztm0v.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
aurelien-git/C/0013/comments.c
int add_numbers(int a, int b) { int sum; sum = a + b; return sum; }
int add_numbers(inta, intb)
int add_numbers(int a, int b)
add_numbers
[ "int", "int", "int" ]
{ "code": [ ".globl add_numbers\n.type add_numbers, @function\nadd_numbers:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tmovl\t-20(%rbp), %edx\n\tmovl\t-24(%rbp), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -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 add_numbers\n.type add_numbers, @function\nadd_numbers:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl add_numbers\n.type add_numbers, @function\nadd_numbers:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global add_numbers\n.type add_numbers, %function\nadd_numbers:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 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 add_numbers\n.type add_numbers, %function\nadd_numbers:\n.LFB13:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global add_numbers\n.type add_numbers, %function\nadd_numbers:\n.LFB23:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "118", "102" ], "var": [ "a", "b" ] }, { "value": [ "5", "6" ], "var": [ "a", "b" ] }, { "value": [ "38", "70" ], "var": [ "a", "b" ] }, { "value": [ "100", "15" ], "var": [ "a", "b" ] }, { "value": [ "16", "46" ], "var": [ "a", "b" ] }, { "value": [ "20", "28" ], "var": [ "a", "b" ] }, { "value": [ "39", "119" ], "var": [ "a", "b" ] }, { "value": [ "16", "110" ], "var": [ "a", "b" ] }, { "value": [ "6", "7" ], "var": [ "a", "b" ] }, { "value": [ "98", "77" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "220" ], "var": [ "returnv" ] }, { "value": [ "11" ], "var": [ "returnv" ] }, { "value": [ "108" ], "var": [ "returnv" ] }, { "value": [ "115" ], "var": [ "returnv" ] }, { "value": [ "62" ], "var": [ "returnv" ] }, { "value": [ "48" ], "var": [ "returnv" ] }, { "value": [ "158" ], "var": [ "returnv" ] }, { "value": [ "126" ], "var": [ "returnv" ] }, { "value": [ "13" ], "var": [ "returnv" ] }, { "value": [ "175" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_29pud1whjr.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int a, int b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int a = input_json["a"]; int b = input_json["b"]; clock_t begin = clock(); int returnv = add_numbers(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "add_numbers", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_29pud1whjr.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
syn2083/BrokenDreams-RoT-2014/src/handler.c
int material_lookup (const char *name) { return 0; }
int material_lookup(const char *name)
int material_lookup (const char *name)
material_lookup
[ "int", "const char *" ]
{ "code": [ ".globl material_lookup\n.type material_lookup, @function\nmaterial_lookup:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl material_lookup\n.type material_lookup, @function\nmaterial_lookup:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl material_lookup\n.type material_lookup, @function\nmaterial_lookup:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global material_lookup\n.type material_lookup, %function\nmaterial_lookup:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tmov\tw0, 0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global material_lookup\n.type material_lookup, %function\nmaterial_lookup:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global material_lookup\n.type material_lookup, %function\nmaterial_lookup:\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": [ "\"axoqpaheetwmm\"" ], "var": [ "name" ] }, { "value": [ "\"rqficiadjqpnaseaohdcqmilmreyyg\"" ], "var": [ "name" ] }, { "value": [ "\"krlifjawfsngwbokuzsopiyio\"" ], "var": [ "name" ] }, { "value": [ "\"\"" ], "var": [ "name" ] }, { "value": [ "\"vnjtbsszcctmjauyxcl\"" ], "var": [ "name" ] }, { "value": [ "\"gvnvjruykypmobniyohirbcqyqeva\"" ], "var": [ "name" ] }, { "value": [ "\"yaildmrrqo\"" ], "var": [ "name" ] }, { "value": [ "\"qsihzaeegx\"" ], "var": [ "name" ] }, { "value": [ "\"uitjugxd\"" ], "var": [ "name" ] }, { "value": [ "\"ihnvjbddmcvrsgqvixdcaevikrihay\"" ], "var": [ "name" ] } ], "output": [ { "value": [ "\"axoqpaheetwmm\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"rqficiadjqpnaseaohdcqmilmreyyg\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"krlifjawfsngwbokuzsopiyio\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"vnjtbsszcctmjauyxcl\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"gvnvjruykypmobniyohirbcqyqeva\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"yaildmrrqo\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"qsihzaeegx\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"uitjugxd\"", "0" ], "var": [ "name", "returnv" ] }, { "value": [ "\"ihnvjbddmcvrsgqvixdcaevikrihay\"", "0" ], "var": [ "name", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_40_fl5sv24.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* name, int returnv) { json output_json; output_json["name"] = name; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* name = strdup(input_json["name"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = material_lookup(name); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(name, returnv); }
master
null
{"livein": ["name"], "liveout": ["name"], "returnvarname": ["returnv"], "execcmd": "", "funname": "material_lookup", "funargs": ["name"], "typemap": {"name": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_40_fl5sv24.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
bjornbytes/lovr/src/lib/noise1234/noise1234.c
float grad2( int hash, float x, float y ) { int h = hash & 7; float u = h<4 ? x : y; float v = h<4 ? y : x; return ((h&1)? -u : u) + ((h&2)? -2.0*v : 2.0*v); }
float grad2(inthash, floatx, floaty)
float grad2( int hash, float x, float y )
grad2
[ "float", "int", "float", "float" ]
{ "code": [ ".globl grad2\n.type grad2, @function\ngrad2:\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\tmovss\t%xmm0, -24(%rbp)\n\tmovss\t%xmm1, -28(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tandl\t$7, %eax\n\tmovl\t%eax, -12(%rbp)\n\tcmpl\t$3, -12(%rbp)\n\tjg\t.L2\n\tmovss\t-24(%rbp), %xmm0\n\tjmp\t.L3\n.L2:\n\tmovss\t-28(%rbp), %xmm0\n.L3:\n\tmovss\t%xmm0, -8(%rbp)\n\tcmpl\t$3, -12(%rbp)\n\tjg\t.L4\n\tmovss\t-28(%rbp), %xmm0\n\tjmp\t.L5\n.L4:\n\tmovss\t-24(%rbp), %xmm0\n.L5:\n\tmovss\t%xmm0, -4(%rbp)\n\tmovl\t-12(%rbp), %eax\n\tandl\t$1, %eax\n\ttestl\t%eax, %eax\n\tje\t.L6\n\tmovss\t-8(%rbp), %xmm0\n\tmovss\t.LC0(%rip), %xmm1\n\txorps\t%xmm1, %xmm0\n\tjmp\t.L7\n.L6:\n\tmovss\t-8(%rbp), %xmm0\n.L7:\n\tcvtss2sd\t%xmm0, %xmm1\n\tmovl\t-12(%rbp), %eax\n\tandl\t$2, %eax\n\ttestl\t%eax, %eax\n\tje\t.L8\n\tcvtss2sd\t-4(%rbp), %xmm2\n\tmovsd\t.LC1(%rip), %xmm0\n\tmulsd\t%xmm2, %xmm0\n\tjmp\t.L9\n.L8:\n\tcvtss2sd\t-4(%rbp), %xmm0\n\taddsd\t%xmm0, %xmm0\n.L9:\n\taddsd\t%xmm1, %xmm0\n\tcvtsd2ss\t%xmm0, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t2147483648\n.LC1: \t.long\t0\n", ".globl grad2\n.type grad2, @function\ngrad2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestb\t$4, %dil\n\tje\t.L2\n\tmovaps\t%xmm1, %xmm2\n\tmovaps\t%xmm0, %xmm1\n\tmovaps\t%xmm2, %xmm0\n.L2:\n\ttestb\t$1, %dil\n\tje\t.L3\n\txorps\t.LC0(%rip), %xmm0\n.L3:\n\tandb\t$2, %dil\n\tcvtss2sd\t%xmm0, %xmm2\n\tcvtss2sd\t%xmm1, %xmm0\n\tje\t.L4\n\tmulsd\t.LC1(%rip), %xmm0\n\tjmp\t.L5\n.L4:\n\taddsd\t%xmm0, %xmm0\n.L5:\n\taddsd\t%xmm2, %xmm0\n\tcvtsd2ss\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t2147483648\n.LC1: \t.long\t0\n", ".globl grad2\n.type grad2, @function\ngrad2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestb\t$4, %dil\n\tje\t.L2\n\tmovaps\t%xmm1, %xmm2\n\tmovaps\t%xmm0, %xmm1\n\tmovaps\t%xmm2, %xmm0\n.L2:\n\ttestb\t$1, %dil\n\tje\t.L3\n\txorps\t.LC0(%rip), %xmm0\n.L3:\n\tandl\t$2, %edi\n\tcvtss2sd\t%xmm0, %xmm0\n\tcvtss2sd\t%xmm1, %xmm1\n\tje\t.L4\n\tmulsd\t.LC1(%rip), %xmm1\n\taddsd\t%xmm1, %xmm0\n\tcvtsd2ss\t%xmm0, %xmm0\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\taddsd\t%xmm1, %xmm1\n\taddsd\t%xmm1, %xmm0\n\tcvtsd2ss\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t2147483648\n.LC1: \t.long\t0\n", ".global grad2\n.type grad2, %function\ngrad2:\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\ts0, [sp, 8]\n\tstr\ts1, [sp, 4]\n\tldr\tw0, [sp, 12]\n\tand\tw0, w0, 7\n\tstr\tw0, [sp, 20]\n\tldr\tw0, [sp, 20]\n\tcmp\tw0, 3\n\tbgt\t.L2\n\tldr\ts0, [sp, 8]\n\tb\t.L3\n.L2:\n\tldr\ts0, [sp, 4]\n.L3:\n\tstr\ts0, [sp, 24]\n\tldr\tw0, [sp, 20]\n\tcmp\tw0, 3\n\tbgt\t.L4\n\tldr\ts0, [sp, 4]\n\tb\t.L5\n.L4:\n\tldr\ts0, [sp, 8]\n.L5:\n\tstr\ts0, [sp, 28]\n\tldr\tw0, [sp, 20]\n\tand\tw0, w0, 1\n\tcmp\tw0, 0\n\tbeq\t.L6\n\tldr\ts0, [sp, 24]\n\tfneg\ts0, s0\n\tb\t.L7\n.L6:\n\tldr\ts0, [sp, 24]\n.L7:\n\tfcvt\td1, s0\n\tldr\tw0, [sp, 20]\n\tand\tw0, w0, 2\n\tcmp\tw0, 0\n\tbeq\t.L8\n\tldr\ts0, [sp, 28]\n\tfcvt\td2, s0\n\tfmov\td0, -2.0e+0\n\tfmul\td0, d2, d0\n\tb\t.L9\n.L8:\n\tldr\ts0, [sp, 28]\n\tfcvt\td0, s0\n\tfadd\td0, d0, d0\n.L9:\n\tfadd\td0, d0, d1\n\tfcvt\ts0, d0\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global grad2\n.type grad2, %function\ngrad2:\n.LFB0:\n\t.cfi_startproc\n\ttbz\tx0, 2, .L2\n\tfmov\ts2, s1\n\tfmov\ts1, s0\n\tfmov\ts0, s2\n.L2:\n\ttbz\tx0, 0, .L3\n\tfneg\ts0, s0\n.L3:\n\tfcvt\td2, s0\n\tfcvt\td0, s1\n\ttbz\tx0, 1, .L4\n\tfmov\td1, -2.0e+0\n\tfmul\td0, d0, d1\n.L5:\n\tfadd\td0, d2, d0\n\tfcvt\ts0, d0\n\tret\n.L4:\n\tfadd\td0, d0, d0\n\tb\t.L5\n\t.cfi_endproc\n\n", ".global grad2\n.type grad2, %function\ngrad2:\n.LFB0:\n\t.cfi_startproc\n\tands\tw1, w0, 4\n\tfcsel\ts2, s1, s0, eq\n\tcmp\tw1, 0\n\tfcsel\ts0, s0, s1, eq\n\ttst\tx0, 1\n\tfcvt\td1, s2\n\tfneg\ts2, s0\n\tfcsel\ts0, s2, s0, ne\n\tfcvt\td0, s0\n\ttbz\tx0, 1, .L4\n\tfmov\td2, -2.0e+0\n\tfmul\td1, d1, d2\n\tfadd\td0, d0, d1\n\tfcvt\ts0, d0\n\tret\n\t.p2align 2,,3\n.L4:\n\tfadd\td1, d1, d1\n\tfadd\td0, d0, d1\n\tfcvt\ts0, d0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "94", "98.2776427966", "3.61938806232" ], "var": [ "hash", "x", "y" ] }, { "value": [ "32", "89.1349845909", "70.6541824995" ], "var": [ "hash", "x", "y" ] }, { "value": [ "37", "74.2711153083", "45.5144949449" ], "var": [ "hash", "x", "y" ] }, { "value": [ "112", "4.36295541848", "49.517771406" ], "var": [ "hash", "x", "y" ] }, { "value": [ "8", "66.9813169254", "1.16438788149" ], "var": [ "hash", "x", "y" ] }, { "value": [ "18", "79.5550608997", "4.33766293274" ], "var": [ "hash", "x", "y" ] }, { "value": [ "30", "71.5624246541", "21.1679778304" ], "var": [ "hash", "x", "y" ] }, { "value": [ "102", "8.59931069842", "1.94404755354" ], "var": [ "hash", "x", "y" ] }, { "value": [ "35", "78.0440507119", "18.8103633879" ], "var": [ "hash", "x", "y" ] }, { "value": [ "6", "18.8740401221", "77.1658890878" ], "var": [ "hash", "x", "y" ] } ], "output": [ { "value": [ "-192.93589782714844" ], "var": [ "returnv" ] }, { "value": [ "230.443359375" ], "var": [ "returnv" ] }, { "value": [ "103.02774047851562" ], "var": [ "returnv" ] }, { "value": [ "103.39849853515625" ], "var": [ "returnv" ] }, { "value": [ "69.31008911132812" ], "var": [ "returnv" ] }, { "value": [ "70.8797378540039" ], "var": [ "returnv" ] }, { "value": [ "-121.95687103271484" ], "var": [ "returnv" ] }, { "value": [ "-15.254573822021484" ], "var": [ "returnv" ] }, { "value": [ "-115.66477966308594" ], "var": [ "returnv" ] }, { "value": [ "39.41780471801758" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_41hgro8_u0.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 hash, float x, float y, float returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int hash = input_json["hash"]; float x = input_json["x"]; float y = input_json["y"]; clock_t begin = clock(); float returnv = grad2(hash, 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(hash, x, y, returnv); }
master
null
{"livein": ["hash", "x", "y"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "grad2", "funargs": ["hash", "x", "y"], "typemap": {"hash": "int32", "x": "float32", "y": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_41hgro8_u0.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
apple/swift-clang/3rd/templight/clang/test/CodeGen/debug-info-cc.c
__attribute__((intel_ocl_bicc)) int add_inteloclbicc(int a, int b) { return a+b; }
int add_inteloclbicc(inta, intb)
__attribute__((intel_ocl_bicc)) int add_inteloclbicc(int a, int b)
add_inteloclbicc
[ "int", "int", "int" ]
{ "code": [ ".globl add_inteloclbicc\n.type add_inteloclbicc, @function\nadd_inteloclbicc:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %edx\n\tmovl\t-8(%rbp), %eax\n\taddl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl add_inteloclbicc\n.type add_inteloclbicc, @function\nadd_inteloclbicc:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl add_inteloclbicc\n.type add_inteloclbicc, @function\nadd_inteloclbicc:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global add_inteloclbicc\n.type add_inteloclbicc, %function\nadd_inteloclbicc:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global add_inteloclbicc\n.type add_inteloclbicc, %function\nadd_inteloclbicc:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global add_inteloclbicc\n.type add_inteloclbicc, %function\nadd_inteloclbicc:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "101", "25" ], "var": [ "a", "b" ] }, { "value": [ "85", "33" ], "var": [ "a", "b" ] }, { "value": [ "82", "72" ], "var": [ "a", "b" ] }, { "value": [ "45", "25" ], "var": [ "a", "b" ] }, { "value": [ "95", "26" ], "var": [ "a", "b" ] }, { "value": [ "6", "86" ], "var": [ "a", "b" ] }, { "value": [ "115", "56" ], "var": [ "a", "b" ] }, { "value": [ "123", "34" ], "var": [ "a", "b" ] }, { "value": [ "33", "89" ], "var": [ "a", "b" ] }, { "value": [ "98", "58" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "126" ], "var": [ "returnv" ] }, { "value": [ "118" ], "var": [ "returnv" ] }, { "value": [ "154" ], "var": [ "returnv" ] }, { "value": [ "70" ], "var": [ "returnv" ] }, { "value": [ "121" ], "var": [ "returnv" ] }, { "value": [ "92" ], "var": [ "returnv" ] }, { "value": [ "171" ], "var": [ "returnv" ] }, { "value": [ "157" ], "var": [ "returnv" ] }, { "value": [ "122" ], "var": [ "returnv" ] }, { "value": [ "156" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_452tjep4rl.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int a, int b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int a = input_json["a"]; int b = input_json["b"]; clock_t begin = clock(); int returnv = add_inteloclbicc(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); }
bb-clusters
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "add_inteloclbicc", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_452tjep4rl.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
nsierra-/libft/ft_isdigit.c
int ft_isdigit(int c) { if (c > 47 && c < 58) return (1); else return (0); }
int ft_isdigit(intc)
int ft_isdigit(int c)
ft_isdigit
[ "int", "int" ]
{ "code": [ ".globl ft_isdigit\n.type ft_isdigit, @function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$47, -4(%rbp)\n\tjle\t.L2\n\tcmpl\t$57, -4(%rbp)\n\tjg\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ft_isdigit\n.type ft_isdigit, @function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$48, %edi\n\txorl\t%eax, %eax\n\tcmpl\t$9, %edi\n\tsetbe\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl ft_isdigit\n.type ft_isdigit, @function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$48, %edi\n\txorl\t%eax, %eax\n\tcmpl\t$9, %edi\n\tsetbe\t%al\n\tret\n\t.cfi_endproc\n\n", ".global ft_isdigit\n.type ft_isdigit, %function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 47\n\tble\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 57\n\tbgt\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ft_isdigit\n.type ft_isdigit, %function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #48\n\tcmp\tw0, 9\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n", ".global ft_isdigit\n.type ft_isdigit, %function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #48\n\tcmp\tw0, 9\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "119" ], "var": [ "c" ] }, { "value": [ "100" ], "var": [ "c" ] }, { "value": [ "16" ], "var": [ "c" ] }, { "value": [ "115" ], "var": [ "c" ] }, { "value": [ "89" ], "var": [ "c" ] }, { "value": [ "88" ], "var": [ "c" ] }, { "value": [ "76" ], "var": [ "c" ] }, { "value": [ "71" ], "var": [ "c" ] }, { "value": [ "50" ], "var": [ "c" ] }, { "value": [ "122" ], "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_603h6lmupc.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int c, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int c = input_json["c"]; clock_t begin = clock(); int returnv = ft_isdigit(c); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(c, returnv); }
master
null
{"livein": ["c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "ft_isdigit", "funargs": ["c"], "typemap": {"c": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_603h6lmupc.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
roKmania/pdmc-samples/recursion/recursive-simple/sum_non_eq_false-unreach-call.c
int sum(int n, int m) { if (n == 0) { return m; } else { return sum(n - 1, m + 1); } }
int sum(intn, intm)
int sum(int n, int m)
sum
[ "int", "int", "int" ]
{ "code": [ ".globl sum\n.type sum, @function\nsum:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tjne\t.L2\n\tmovl\t-8(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-8(%rbp), %eax\n\tleal\t1(%rax), %edx\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$1, %eax\n\tmovl\t%edx, %esi\n\tmovl\t%eax, %edi\n\tcall\tsum\n.L3:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl sum\n.type sum, @function\nsum:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl sum\n.type sum, @function\nsum:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rsi,%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global sum\n.type sum, %function\nsum:\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\tstr\tw1, [sp, 24]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbne\t.L2\n\tldr\tw0, [sp, 24]\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 28]\n\tsub\tw2, w0, #1\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 1\n\tmov\tw1, w0\n\tmov\tw0, w2\n\tbl\tsum\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 sum\n.type sum, %function\nsum:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global sum\n.type sum, %function\nsum:\n.LFB0:\n\t.cfi_startproc\n\tadd\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": [ "71", "94" ], "var": [ "n", "m" ] }, { "value": [ "1", "74" ], "var": [ "n", "m" ] }, { "value": [ "75", "46" ], "var": [ "n", "m" ] }, { "value": [ "123", "5" ], "var": [ "n", "m" ] }, { "value": [ "19", "15" ], "var": [ "n", "m" ] }, { "value": [ "51", "16" ], "var": [ "n", "m" ] }, { "value": [ "106", "43" ], "var": [ "n", "m" ] }, { "value": [ "15", "94" ], "var": [ "n", "m" ] }, { "value": [ "46", "43" ], "var": [ "n", "m" ] }, { "value": [ "44", "91" ], "var": [ "n", "m" ] } ], "output": [ { "value": [ "165" ], "var": [ "returnv" ] }, { "value": [ "75" ], "var": [ "returnv" ] }, { "value": [ "121" ], "var": [ "returnv" ] }, { "value": [ "128" ], "var": [ "returnv" ] }, { "value": [ "34" ], "var": [ "returnv" ] }, { "value": [ "67" ], "var": [ "returnv" ] }, { "value": [ "149" ], "var": [ "returnv" ] }, { "value": [ "109" ], "var": [ "returnv" ] }, { "value": [ "89" ], "var": [ "returnv" ] }, { "value": [ "135" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_428k7gz_pa.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int m, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; int m = input_json["m"]; clock_t begin = clock(); int returnv = sum(n, m); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, m, returnv); }
master
null
{"livein": ["n", "m"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "sum", "funargs": ["n", "m"], "typemap": {"n": "int32", "m": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_428k7gz_pa.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Seterplus/CSAPP/datalab-2015/bits.c
int greatestBitPos(int x) { x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; return ((~x >> 1) | (1 << 31)) & x; }
int greatestBitPos(intx)
int greatestBitPos(int x)
greatestBitPos
[ "int", "int" ]
{ "code": [ ".globl greatestBitPos\n.type greatestBitPos, @function\ngreatestBitPos:\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\tsarl\t%eax\n\torl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsarl\t$2, %eax\n\torl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsarl\t$4, %eax\n\torl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsarl\t$8, %eax\n\torl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsarl\t$16, %eax\n\torl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tnotl\t%eax\n\tsarl\t%eax\n\torl\t$-2147483648, %eax\n\tandl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl greatestBitPos\n.type greatestBitPos, @function\ngreatestBitPos:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tsarl\t%eax\n\torl\t%eax, %edi\n\tmovl\t%edi, %eax\n\tsarl\t$2, %eax\n\torl\t%edi, %eax\n\tmovl\t%eax, %edi\n\tsarl\t$4, %edi\n\torl\t%edi, %eax\n\tmovl\t%eax, %edi\n\tsarl\t$8, %edi\n\torl\t%eax, %edi\n\tmovl\t%edi, %eax\n\tsarl\t$16, %eax\n\torl\t%eax, %edi\n\tmovl\t%edi, %eax\n\tnotl\t%eax\n\tsarl\t%eax\n\torl\t$-2147483648, %eax\n\tandl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl greatestBitPos\n.type greatestBitPos, @function\ngreatestBitPos:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tsarl\t%eax\n\torl\t%eax, %edi\n\tmovl\t%edi, %eax\n\tsarl\t$2, %eax\n\torl\t%edi, %eax\n\tmovl\t%eax, %edi\n\tsarl\t$4, %edi\n\torl\t%edi, %eax\n\tmovl\t%eax, %edi\n\tsarl\t$8, %edi\n\torl\t%eax, %edi\n\tmovl\t%edi, %eax\n\tsarl\t$16, %eax\n\torl\t%eax, %edi\n\tmovl\t%edi, %eax\n\tnotl\t%eax\n\tsarl\t%eax\n\torl\t$-2147483648, %eax\n\tandl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global greatestBitPos\n.type greatestBitPos, %function\ngreatestBitPos:\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\tasr\tw0, w0, 1\n\tldr\tw1, [sp, 12]\n\torr\tw0, w1, w0\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tasr\tw0, w0, 2\n\tldr\tw1, [sp, 12]\n\torr\tw0, w1, w0\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tasr\tw0, w0, 4\n\tldr\tw1, [sp, 12]\n\torr\tw0, w1, w0\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tasr\tw0, w0, 8\n\tldr\tw1, [sp, 12]\n\torr\tw0, w1, w0\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tasr\tw0, w0, 16\n\tldr\tw1, [sp, 12]\n\torr\tw0, w1, w0\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tmvn\tw0, w0\n\tasr\tw0, w0, 1\n\torr\tw1, w0, -2147483648\n\tldr\tw0, [sp, 12]\n\tand\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global greatestBitPos\n.type greatestBitPos, %function\ngreatestBitPos:\n.LFB0:\n\t.cfi_startproc\n\torr\tw1, w0, w0, asr 1\n\torr\tw1, w1, w1, asr 2\n\torr\tw1, w1, w1, asr 4\n\torr\tw1, w1, w1, asr 8\n\torr\tw1, w1, w1, asr 16\n\tmvn\tw0, w1, asr 1\n\torr\tw0, w0, -2147483648\n\tand\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global greatestBitPos\n.type greatestBitPos, %function\ngreatestBitPos:\n.LFB0:\n\t.cfi_startproc\n\torr\tw1, w0, w0, asr 1\n\torr\tw1, w1, w1, asr 2\n\torr\tw1, w1, w1, asr 4\n\torr\tw1, w1, w1, asr 8\n\torr\tw1, w1, w1, asr 16\n\tmvn\tw0, w1, asr 1\n\torr\tw0, w0, -2147483648\n\tand\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "113" ], "var": [ "x" ] }, { "value": [ "55" ], "var": [ "x" ] }, { "value": [ "70" ], "var": [ "x" ] }, { "value": [ "5" ], "var": [ "x" ] }, { "value": [ "116" ], "var": [ "x" ] }, { "value": [ "25" ], "var": [ "x" ] }, { "value": [ "108" ], "var": [ "x" ] }, { "value": [ "108" ], "var": [ "x" ] }, { "value": [ "17" ], "var": [ "x" ] }, { "value": [ "111" ], "var": [ "x" ] } ], "output": [ { "value": [ "64" ], "var": [ "returnv" ] }, { "value": [ "32" ], "var": [ "returnv" ] }, { "value": [ "64" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "64" ], "var": [ "returnv" ] }, { "value": [ "16" ], "var": [ "returnv" ] }, { "value": [ "64" ], "var": [ "returnv" ] }, { "value": [ "64" ], "var": [ "returnv" ] }, { "value": [ "16" ], "var": [ "returnv" ] }, { "value": [ "64" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_548mc_r3g1.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = greatestBitPos(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": "greatestBitPos", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_548mc_r3g1.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
TulipCharts/tulipnode/external/tiamalgamation.c
int ti_sqrt_start(double const *options) { (void)options; return 0; }
int ti_sqrt_start(const double *options)
int ti_sqrt_start(double const *options)
ti_sqrt_start
[ "int", "const double *" ]
{ "code": [ ".globl ti_sqrt_start\n.type ti_sqrt_start, @function\nti_sqrt_start:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ti_sqrt_start\n.type ti_sqrt_start, @function\nti_sqrt_start:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl ti_sqrt_start\n.type ti_sqrt_start, @function\nti_sqrt_start:\n.LFB27:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global ti_sqrt_start\n.type ti_sqrt_start, %function\nti_sqrt_start:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tmov\tw0, 0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ti_sqrt_start\n.type ti_sqrt_start, %function\nti_sqrt_start:\n.LFB22:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global ti_sqrt_start\n.type ti_sqrt_start, %function\nti_sqrt_start:\n.LFB27:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <math.h> #include <assert.h> #include <string.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[63.1664629532, 53.8432270291, 6.48958563204, 82.3780599705, 7.86720313195, 3.60690076621, 71.4442128238, 90.1457109628, 50.0953836783, 18.9550651736, 59.8197567057, 21.0440622698, 58.1956301899, 40.0060312095, 30.6763760093, 82.6307541147, 6.84077298235, 56.6857428277, 68.4175838525, 44.3474278673, 16.5436115215, 84.5942141899, 80.7243510944, 9.81804908777, 63.4862792986, 32.700041319, 30.4205673438, 55.8821808035, 22.1453112749, 43.5142463016, 11.9850186977, 0.311385900722]" ], "var": [ "options" ] }, { "value": [ "[48.7438014786, 84.6590007197, 62.5406240241, 62.2698221249, 28.7954145576, 1.91212155389, 15.6369375404, 32.2966404702, 92.5688516807, 11.1814067844, 31.2253103522, 75.2409702995, 89.2611867795, 81.8943618205, 74.7127959521, 3.55764552413, 22.4907376402, 82.5060482874, 14.3248321739, 75.08249484, 61.5635244153, 12.423978839, 76.1051896752, 53.411980438, 84.2713187884, 99.8431049617, 56.414407569, 13.2702094662, 87.2300665248, 15.4839198725, 82.7360223394, 6.79404322601]" ], "var": [ "options" ] }, { "value": [ "[23.1934236912, 97.0069112645, 93.7115278708, 63.9995413953, 21.0826670454, 70.2432967862, 90.6252711733, 52.6796066205, 44.2074384975, 62.8755377618, 18.6629000683, 9.42595635854, 41.9511027508, 12.9782759037, 62.5789623019, 60.4717359823, 25.8967375903, 30.0327887276, 22.9215512832, 17.6567062793, 96.4687421319, 44.8195730397, 72.9979907564, 5.5209058319, 2.72242138504, 40.5228133396, 13.8305880064, 45.4775571504, 83.0060384843, 91.8364344258, 7.04587554214, 23.9920014743]" ], "var": [ "options" ] }, { "value": [ "[26.6361699833, 36.4387736626, 72.1005098501, 12.5063702728, 31.9924440288, 46.4852420452, 14.0633701944, 75.3128707144, 35.386354907, 63.7524932036, 80.1236600671, 58.0789295777, 32.1580264746, 64.9811293582, 7.95432803052, 27.9612769801, 27.0106516319, 95.2739172993, 51.7513197222, 37.6907364671, 32.7061115778, 51.2035293357, 90.004020896, 42.2055575158, 14.5686825268, 36.3213893785, 52.5136510606, 45.4016631215, 59.4638080884, 45.9729655659, 74.2704228312, 56.3515327316]" ], "var": [ "options" ] }, { "value": [ "[86.6199526854, 78.3308392659, 74.425723442, 25.7040766374, 53.3488154749, 51.8345962019, 64.1739072294, 97.0062059685, 81.7241791886, 78.5697991045, 3.26054125, 61.9952672074, 93.054701242, 99.2927522262, 55.8704694515, 46.1022481897, 88.9374803551, 44.9344931678, 93.6154129307, 31.3148204574, 23.995590476, 4.09242625371, 60.822928918, 9.60494486935, 69.4761977829, 37.6523360145, 50.154728803, 34.6050762743, 14.1778854464, 17.7602272272, 94.5682293086, 14.6345738059]" ], "var": [ "options" ] }, { "value": [ "[88.2683268045, 44.3813955601, 92.9617319212, 95.312655536, 98.1680469375, 14.9670370494, 48.3548783769, 27.5370715913, 44.44598022, 95.8981375147, 41.494618401, 25.5085794287, 94.5052266139, 23.3439198042, 35.6899553689, 64.208992178, 93.0951237485, 13.8683798959, 92.7729142556, 5.31130786645, 91.7843213816, 76.2035957166, 60.2592161892, 10.4439268455, 32.326162695, 78.4069647564, 73.3106910273, 26.4240872347, 50.24678482, 71.4740887915, 83.8595194078, 56.4085440333]" ], "var": [ "options" ] }, { "value": [ "[25.3849621246, 90.9676813862, 37.802994371, 99.7269151747, 73.2192570469, 46.5818536774, 79.855640653, 26.4411316506, 86.2334368337, 80.3425777941, 30.0104447606, 77.0407399731, 14.193965401, 48.1117289643, 92.5760733219, 70.1769059145, 51.2831453103, 73.83460864, 15.3872366929, 79.0282702686, 90.9533914548, 80.9479903175, 77.6793305004, 1.0361655497, 56.6710341052, 45.1350250565, 55.4518238348, 33.2299646756, 50.6385388221, 55.9957160978, 60.8439739145, 99.3618444259]" ], "var": [ "options" ] }, { "value": [ "[56.3113747165, 31.7890789488, 91.2218157196, 94.2114704838, 76.2958295397, 72.8852636575, 39.7304574881, 47.3609227125, 52.8875029305, 68.3843752915, 96.2546864537, 61.1163716447, 89.1187305198, 99.3925729097, 57.571673068, 0.188985541003, 57.5215454508, 63.8010484008, 88.8809415505, 54.1707399284, 60.5446897786, 64.4581373917, 55.161856902, 66.0592225509, 66.4873332396, 26.0968096164, 38.7698626421, 60.8623824553, 41.8910447, 50.1511770591, 38.5033742048, 5.14156920314]" ], "var": [ "options" ] }, { "value": [ "[99.3881477041, 90.9540554304, 28.8722749745, 73.2643839461, 51.8808385646, 75.3724326147, 81.8056754369, 68.8773192525, 98.2316729557, 91.1494165031, 83.5530239236, 35.6632243934, 3.30368891984, 16.9108555976, 95.8658923354, 99.5054130263, 48.1364871919, 38.3960557927, 17.5343734907, 90.1193459377, 75.2992603929, 51.2232342211, 8.09642157002, 3.96414942097, 60.063696914, 41.7115674523, 5.49275248573, 66.4946514326, 12.708571742, 89.7265021762, 33.2767581798, 89.3873640082]" ], "var": [ "options" ] }, { "value": [ "[64.1753600457, 63.3587827761, 7.51836265434, 46.8073423089, 15.4605562372, 70.3002729673, 87.8308190101, 51.7076112597, 71.9264477245, 84.7577865065, 11.3525390915, 94.8824413277, 45.7489833326, 64.1621456463, 25.7689393098, 48.8392293284, 84.3129800872, 7.6928368544, 6.32000694389, 0.84894150516, 59.0363845227, 90.2997697425, 45.7821331399, 11.5374946641, 48.2908225238, 68.3806252668, 82.6553245951, 61.0069545002, 82.4081357661, 27.0226241346, 89.2556716998, 79.8712610227]" ], "var": [ "options" ] } ], "output": [ { "value": [ "[63.1664629532, 53.8432270291, 6.48958563204, 82.3780599705, 7.86720313195, 3.60690076621, 71.4442128238, 90.1457109628, 50.0953836783, 18.9550651736, 59.8197567057, 21.0440622698, 58.1956301899, 40.0060312095, 30.6763760093, 82.6307541147, 6.84077298235, 56.6857428277, 68.4175838525, 44.3474278673, 16.5436115215, 84.5942141899, 80.7243510944, 9.81804908777, 63.4862792986, 32.700041319, 30.4205673438, 55.8821808035, 22.1453112749, 43.5142463016, 11.9850186977, 0.311385900722]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[48.7438014786, 84.6590007197, 62.5406240241, 62.2698221249, 28.7954145576, 1.91212155389, 15.6369375404, 32.2966404702, 92.5688516807, 11.1814067844, 31.2253103522, 75.2409702995, 89.2611867795, 81.8943618205, 74.7127959521, 3.55764552413, 22.4907376402, 82.5060482874, 14.3248321739, 75.08249484, 61.5635244153, 12.423978839, 76.1051896752, 53.411980438, 84.2713187884, 99.8431049617, 56.414407569, 13.2702094662, 87.2300665248, 15.4839198725, 82.7360223394, 6.79404322601]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[23.1934236912, 97.0069112645, 93.7115278708, 63.9995413953, 21.0826670454, 70.2432967862, 90.6252711733, 52.6796066205, 44.2074384975, 62.8755377618, 18.6629000683, 9.42595635854, 41.9511027508, 12.9782759037, 62.5789623019, 60.4717359823, 25.8967375903, 30.0327887276, 22.9215512832, 17.6567062793, 96.4687421319, 44.8195730397, 72.9979907564, 5.5209058319, 2.72242138504, 40.5228133396, 13.8305880064, 45.4775571504, 83.0060384843, 91.8364344258, 7.04587554214, 23.9920014743]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[26.6361699833, 36.4387736626, 72.1005098501, 12.5063702728, 31.9924440288, 46.4852420452, 14.0633701944, 75.3128707144, 35.386354907, 63.7524932036, 80.1236600671, 58.0789295777, 32.1580264746, 64.9811293582, 7.95432803052, 27.9612769801, 27.0106516319, 95.2739172993, 51.7513197222, 37.6907364671, 32.7061115778, 51.2035293357, 90.004020896, 42.2055575158, 14.5686825268, 36.3213893785, 52.5136510606, 45.4016631215, 59.4638080884, 45.9729655659, 74.2704228312, 56.3515327316]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[86.6199526854, 78.3308392659, 74.425723442, 25.7040766374, 53.3488154749, 51.8345962019, 64.1739072294, 97.0062059685, 81.7241791886, 78.5697991045, 3.26054125, 61.9952672074, 93.054701242, 99.2927522262, 55.8704694515, 46.1022481897, 88.9374803551, 44.9344931678, 93.6154129307, 31.3148204574, 23.995590476, 4.09242625371, 60.822928918, 9.60494486935, 69.4761977829, 37.6523360145, 50.154728803, 34.6050762743, 14.1778854464, 17.7602272272, 94.5682293086, 14.6345738059]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[88.2683268045, 44.3813955601, 92.9617319212, 95.312655536, 98.1680469375, 14.9670370494, 48.3548783769, 27.5370715913, 44.44598022, 95.8981375147, 41.494618401, 25.5085794287, 94.5052266139, 23.3439198042, 35.6899553689, 64.208992178, 93.0951237485, 13.8683798959, 92.7729142556, 5.31130786645, 91.7843213816, 76.2035957166, 60.2592161892, 10.4439268455, 32.326162695, 78.4069647564, 73.3106910273, 26.4240872347, 50.24678482, 71.4740887915, 83.8595194078, 56.4085440333]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[25.3849621246, 90.9676813862, 37.802994371, 99.7269151747, 73.2192570469, 46.5818536774, 79.855640653, 26.4411316506, 86.2334368337, 80.3425777941, 30.0104447606, 77.0407399731, 14.193965401, 48.1117289643, 92.5760733219, 70.1769059145, 51.2831453103, 73.83460864, 15.3872366929, 79.0282702686, 90.9533914548, 80.9479903175, 77.6793305004, 1.0361655497, 56.6710341052, 45.1350250565, 55.4518238348, 33.2299646756, 50.6385388221, 55.9957160978, 60.8439739145, 99.3618444259]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[56.3113747165, 31.7890789488, 91.2218157196, 94.2114704838, 76.2958295397, 72.8852636575, 39.7304574881, 47.3609227125, 52.8875029305, 68.3843752915, 96.2546864537, 61.1163716447, 89.1187305198, 99.3925729097, 57.571673068, 0.188985541003, 57.5215454508, 63.8010484008, 88.8809415505, 54.1707399284, 60.5446897786, 64.4581373917, 55.161856902, 66.0592225509, 66.4873332396, 26.0968096164, 38.7698626421, 60.8623824553, 41.8910447, 50.1511770591, 38.5033742048, 5.14156920314]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[99.3881477041, 90.9540554304, 28.8722749745, 73.2643839461, 51.8808385646, 75.3724326147, 81.8056754369, 68.8773192525, 98.2316729557, 91.1494165031, 83.5530239236, 35.6632243934, 3.30368891984, 16.9108555976, 95.8658923354, 99.5054130263, 48.1364871919, 38.3960557927, 17.5343734907, 90.1193459377, 75.2992603929, 51.2232342211, 8.09642157002, 3.96414942097, 60.063696914, 41.7115674523, 5.49275248573, 66.4946514326, 12.708571742, 89.7265021762, 33.2767581798, 89.3873640082]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[64.1753600457, 63.3587827761, 7.51836265434, 46.8073423089, 15.4605562372, 70.3002729673, 87.8308190101, 51.7076112597, 71.9264477245, 84.7577865065, 11.3525390915, 94.8824413277, 45.7489833326, 64.1621456463, 25.7689393098, 48.8392293284, 84.3129800872, 7.6928368544, 6.32000694389, 0.84894150516, 59.0363845227, 90.2997697425, 45.7821331399, 11.5374946641, 48.2908225238, 68.3806252668, 82.6553245951, 61.0069545002, 82.4081357661, 27.0226241346, 89.2556716998, 79.8712610227]", "0" ], "var": [ "options", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_48xwxpswi7.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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_sqrt_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_sqrt_start", "funargs": ["options"], "typemap": {"options": "array(float64#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_48xwxpswi7.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
karinakozarova/C-Programming-Exercises/Code/Entrance level/11grade/17_twin_primes.c
int are_prime(int num1,int num2){ if(num1 - num2 == 2 || num2 - num1 == 2) return 1; return 0; }
int are_prime(intnum1, intnum2)
int are_prime(int num1,int num2)
are_prime
[ "int", "int", "int" ]
{ "code": [ ".globl are_prime\n.type are_prime, @function\nare_prime:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsubl\t-8(%rbp), %eax\n\tcmpl\t$2, %eax\n\tje\t.L2\n\tmovl\t-8(%rbp), %eax\n\tsubl\t-4(%rbp), %eax\n\tcmpl\t$2, %eax\n\tjne\t.L3\n.L2:\n\tmovl\t$1, %eax\n\tjmp\t.L4\n.L3:\n\tmovl\t$0, %eax\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl are_prime\n.type are_prime, @function\nare_prime:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %edx\n\tmovl\t$1, %eax\n\tsubl\t%esi, %edx\n\tcmpl\t$2, %edx\n\tje\t.L1\n\tsubl\t%edi, %esi\n\txorl\t%eax, %eax\n\tcmpl\t$2, %esi\n\tsete\t%al\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl are_prime\n.type are_prime, @function\nare_prime:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %edx\n\tmovl\t$1, %eax\n\tsubl\t%esi, %edx\n\tcmpl\t$2, %edx\n\tje\t.L1\n\tsubl\t%edi, %esi\n\txorl\t%eax, %eax\n\tcmpl\t$2, %esi\n\tsete\t%al\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global are_prime\n.type are_prime, %function\nare_prime:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tsub\tw0, w1, w0\n\tcmp\tw0, 2\n\tbeq\t.L2\n\tldr\tw1, [sp, 8]\n\tldr\tw0, [sp, 12]\n\tsub\tw0, w1, w0\n\tcmp\tw0, 2\n\tbne\t.L3\n.L2:\n\tmov\tw0, 1\n\tb\t.L4\n.L3:\n\tmov\tw0, 0\n.L4:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global are_prime\n.type are_prime, %function\nare_prime:\n.LFB13:\n\t.cfi_startproc\n\tsub\tw2, w0, w1\n\tcmp\tw2, 2\n\tbeq\t.L3\n\tsub\tw1, w1, w0\n\tcmp\tw1, 2\n\tcset\tw0, eq\n.L1:\n\tret\n.L3:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global are_prime\n.type are_prime, %function\nare_prime:\n.LFB23:\n\t.cfi_startproc\n\tsub\tw2, w0, w1\n\tcmp\tw2, 2\n\tbeq\t.L3\n\tsub\tw1, w1, w0\n\tcmp\tw1, 2\n\tcset\tw0, eq\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "53", "100" ], "var": [ "num1", "num2" ] }, { "value": [ "22", "125" ], "var": [ "num1", "num2" ] }, { "value": [ "4", "49" ], "var": [ "num1", "num2" ] }, { "value": [ "30", "63" ], "var": [ "num1", "num2" ] }, { "value": [ "36", "7" ], "var": [ "num1", "num2" ] }, { "value": [ "96", "59" ], "var": [ "num1", "num2" ] }, { "value": [ "82", "46" ], "var": [ "num1", "num2" ] }, { "value": [ "25", "42" ], "var": [ "num1", "num2" ] }, { "value": [ "33", "123" ], "var": [ "num1", "num2" ] }, { "value": [ "61", "52" ], "var": [ "num1", "num2" ] } ], "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_298xuhrcfy.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 num1, int num2, 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 num1 = input_json["num1"]; int num2 = input_json["num2"]; clock_t begin = clock(); int returnv = are_prime(num1, num2); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(num1, num2, returnv); }
master
null
{"livein": ["num1", "num2"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "are_prime", "funargs": ["num1", "num2"], "typemap": {"num1": "int32", "num2": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_298xuhrcfy.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Benjins/GBADev/pureAsm/asm.c
int ParseInt(const char* str, int len) { const char* cursor = str; int val = 0; int sign = 1; int isHex = 0; if (*cursor == '-') { cursor++; sign = -1; } else if (*cursor == '0' && cursor[1] == 'x') { cursor += 2; isHex = 1; } const int base = (isHex ? 16 : 10); while (*cursor && (cursor - str) < len) { int digit = (*cursor - '0'); if (isHex && *cursor >= 'A' && *cursor <= 'F') { digit = (*cursor - 'A') + 10; } val *= base; val += digit; cursor++; } return val * sign; }
int ParseInt(const char *str, intlen)
int ParseInt(const char* str, int len)
ParseInt
[ "int", "const char *", "int" ]
{ "code": [ ".globl ParseInt\n.type ParseInt, @function\nParseInt:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -40(%rbp)\n\tmovl\t%esi, -44(%rbp)\n\tmovq\t-40(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n\tmovl\t$0, -28(%rbp)\n\tmovl\t$1, -24(%rbp)\n\tmovl\t$0, -20(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$45, %al\n\tjne\t.L2\n\taddq\t$1, -8(%rbp)\n\tmovl\t$-1, -24(%rbp)\n\tjmp\t.L3\n.L2:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$48, %al\n\tjne\t.L3\n\tmovq\t-8(%rbp), %rax\n\taddq\t$1, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$120, %al\n\tjne\t.L3\n\taddq\t$2, -8(%rbp)\n\tmovl\t$1, -20(%rbp)\n.L3:\n\tcmpl\t$0, -20(%rbp)\n\tje\t.L4\n\tmovl\t$16, %eax\n\tjmp\t.L5\n.L4:\n\tmovl\t$10, %eax\n.L5:\n\tmovl\t%eax, -12(%rbp)\n\tjmp\t.L6\n.L9:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tsubl\t$48, %eax\n\tmovl\t%eax, -16(%rbp)\n\tcmpl\t$0, -20(%rbp)\n\tje\t.L7\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$64, %al\n\tjle\t.L7\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$70, %al\n\tjg\t.L7\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tsubl\t$55, %eax\n\tmovl\t%eax, -16(%rbp)\n.L7:\n\tmovl\t-28(%rbp), %eax\n\timull\t-12(%rbp), %eax\n\tmovl\t%eax, -28(%rbp)\n\tmovl\t-16(%rbp), %eax\n\taddl\t%eax, -28(%rbp)\n\taddq\t$1, -8(%rbp)\n.L6:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L8\n\tmovq\t-8(%rbp), %rax\n\tsubq\t-40(%rbp), %rax\n\tmovq\t%rax, %rdx\n\tmovl\t-44(%rbp), %eax\n\tcltq\n\tcmpq\t%rax, %rdx\n\tjl\t.L9\n.L8:\n\tmovl\t-28(%rbp), %eax\n\timull\t-24(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ParseInt\n.type ParseInt, @function\nParseInt:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t(%rdi), %al\n\tcmpb\t$45, %al\n\tjne\t.L2\n\tleaq\t1(%rdi), %rdx\n\txorl\t%ecx, %ecx\n\torl\t$-1, %r9d\n\tjmp\t.L25\n.L2:\n\tcmpb\t$48, %al\n\tjne\t.L10\n\tcmpb\t$120, 1(%rdi)\n\tjne\t.L10\n\tleaq\t2(%rdi), %rdx\n\tmovl\t$1, %ecx\n\tmovl\t$1, %r9d\n\tmovl\t$16, %r10d\n\tjmp\t.L3\n.L10:\n\tmovq\t%rdi, %rdx\n\txorl\t%ecx, %ecx\n\tmovl\t$1, %r9d\n.L25:\n\tmovl\t$10, %r10d\n.L3:\n\tmovb\t(%rdx), %r8b\n\txorl\t%eax, %eax\n\tmovslq\t%esi, %rsi\n\tandl\t$1, %ecx\n\ttestb\t%r8b, %r8b\n\tjne\t.L20\n.L21:\n\timull\t%r9d, %eax\n\tret\n.L20:\n\tmovq\t%rdx, %r11\n\tsubq\t%rdi, %r11\n\tcmpq\t%rsi, %r11\n\tjge\t.L21\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 3, -16\n.L7:\n\tmovsbl\t%r8b, %ebx\n\tsubl\t$65, %r8d\n\tleal\t-48(%rbx), %r11d\n\tcmpb\t$5, %r8b\n\tja\t.L5\n\ttestb\t%cl, %cl\n\tje\t.L5\n\tleal\t-55(%rbx), %r11d\n.L5:\n\timull\t%r10d, %eax\n\tmovb\t1(%rdx), %r8b\n\tincq\t%rdx\n\taddl\t%r11d, %eax\n\ttestb\t%r8b, %r8b\n\tjne\t.L6\n.L8:\n\timull\t%r9d, %eax\n\tpopq\t%rbx\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 8\n\tret\n.L6:\n\t.cfi_restore_state\n\tmovq\t%rdx, %r11\n\tsubq\t%rdi, %r11\n\tcmpq\t%rsi, %r11\n\tjl\t.L7\n\tjmp\t.L8\n\t.cfi_endproc\n\n", ".globl ParseInt\n.type ParseInt, @function\nParseInt:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %edx\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 3, -16\n\tcmpb\t$45, %dl\n\tje\t.L22\n\tcmpb\t$48, %dl\n\tje\t.L23\n\tmovq\t%rdi, %rcx\n\txorl\t%r11d, %r11d\n\txorl\t%eax, %eax\n\tmovl\t$1, %ebx\n\tmovl\t$10, %r10d\n.L3:\n\ttestb\t%dl, %dl\n\tje\t.L24\n.L4:\n\tmovslq\t%esi, %r9\n\tcmpq\t%rax, %r9\n\tmovl\t$0, %eax\n\tjg\t.L8\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tmovq\t%rcx, %rsi\n\tsubq\t%rdi, %rsi\n\tcmpq\t%rsi, %r9\n\tjle\t.L20\n.L8:\n\tmovsbl\t%dl, %esi\n\tsubl\t$65, %edx\n\tleal\t-48(%rsi), %r8d\n\tcmpb\t$5, %dl\n\tja\t.L6\n\tsubl\t$55, %esi\n\ttestb\t%r11b, %r11b\n\tcmovne\t%esi, %r8d\n.L6:\n\timull\t%r10d, %eax\n\tmovzbl\t1(%rcx), %edx\n\taddq\t$1, %rcx\n\taddl\t%r8d, %eax\n\ttestb\t%dl, %dl\n\tjne\t.L7\n.L20:\n\timull\t%ebx, %eax\n.L1:\n\tpopq\t%rbx\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 8\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L23:\n\t.cfi_restore_state\n\tcmpb\t$120, 1(%rdi)\n\tje\t.L25\n\tmovq\t%rdi, %rcx\n\txorl\t%r11d, %r11d\n\txorl\t%eax, %eax\n\tmovl\t$1, %ebx\n\tmovl\t$10, %r10d\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L22:\n\tmovzbl\t1(%rdi), %edx\n\tleaq\t1(%rdi), %rcx\n\txorl\t%r11d, %r11d\n\tmovl\t$1, %eax\n\tmovl\t$-1, %ebx\n\tmovl\t$10, %r10d\n\tjmp\t.L3\n.L25:\n\tmovzbl\t2(%rdi), %edx\n\tleaq\t2(%rdi), %rcx\n\tmovl\t$1, %r11d\n\tmovl\t$2, %eax\n\tmovl\t$1, %ebx\n\tmovl\t$16, %r10d\n\tjmp\t.L3\n.L24:\n\txorl\t%eax, %eax\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".global ParseInt\n.type ParseInt, %function\nParseInt:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #48\n\t.cfi_def_cfa_offset 48\n\tstr\tx0, [sp, 8]\n\tstr\tw1, [sp, 4]\n\tldr\tx0, [sp, 8]\n\tstr\tx0, [sp, 40]\n\tstr\twzr, [sp, 20]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 24]\n\tstr\twzr, [sp, 28]\n\tldr\tx0, [sp, 40]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 45\n\tbne\t.L2\n\tldr\tx0, [sp, 40]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 40]\n\tmov\tw0, -1\n\tstr\tw0, [sp, 24]\n\tb\t.L3\n.L2:\n\tldr\tx0, [sp, 40]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 48\n\tbne\t.L3\n\tldr\tx0, [sp, 40]\n\tadd\tx0, x0, 1\n\tldrb\tw0, [x0]\n\tcmp\tw0, 120\n\tbne\t.L3\n\tldr\tx0, [sp, 40]\n\tadd\tx0, x0, 2\n\tstr\tx0, [sp, 40]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 28]\n.L3:\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbeq\t.L4\n\tmov\tw0, 16\n\tb\t.L5\n.L4:\n\tmov\tw0, 10\n.L5:\n\tstr\tw0, [sp, 36]\n\tb\t.L6\n.L9:\n\tldr\tx0, [sp, 40]\n\tldrb\tw0, [x0]\n\tsub\tw0, w0, #48\n\tstr\tw0, [sp, 32]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbeq\t.L7\n\tldr\tx0, [sp, 40]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 64\n\tbls\t.L7\n\tldr\tx0, [sp, 40]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 70\n\tbhi\t.L7\n\tldr\tx0, [sp, 40]\n\tldrb\tw0, [x0]\n\tsub\tw0, w0, #55\n\tstr\tw0, [sp, 32]\n.L7:\n\tldr\tw1, [sp, 20]\n\tldr\tw0, [sp, 36]\n\tmul\tw0, w1, w0\n\tstr\tw0, [sp, 20]\n\tldr\tw1, [sp, 20]\n\tldr\tw0, [sp, 32]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 20]\n\tldr\tx0, [sp, 40]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 40]\n.L6:\n\tldr\tx0, [sp, 40]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L8\n\tldr\tx1, [sp, 40]\n\tldr\tx0, [sp, 8]\n\tsub\tx1, x1, x0\n\tldrsw\tx0, [sp, 4]\n\tcmp\tx1, x0\n\tblt\t.L9\n.L8:\n\tldr\tw1, [sp, 20]\n\tldr\tw0, [sp, 24]\n\tmul\tw0, w1, w0\n\tadd\tsp, sp, 48\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ParseInt\n.type ParseInt, %function\nParseInt:\n.LFB13:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tcmp\tw2, 45\n\tbne\t.L2\n\tadd\tx2, x0, 1\n\tmov\tw4, 0\n\tmov\tw5, -1\n.L15:\n\tmov\tw7, 10\n\tb\t.L3\n.L2:\n\tcmp\tw2, 48\n\tbne\t.L10\n\tldrb\tw2, [x0, 1]\n\tcmp\tw2, 120\n\tbne\t.L10\n\tmov\tw4, 1\n\tadd\tx2, x0, 2\n\tmov\tw5, w4\n\tmov\tw7, 16\n.L3:\n\tsxtw\tx1, w1\n\tmov\tw3, 0\n.L4:\n\tldrb\tw6, [x2]\n\tcbnz\tw6, .L6\n.L8:\n\tmul\tw0, w3, w5\n\tret\n.L10:\n\tmov\tx2, x0\n\tmov\tw4, 0\n\tmov\tw5, 1\n\tb\t.L15\n.L6:\n\tsub\tx8, x2, x0\n\tcmp\tx8, x1\n\tbge\t.L8\n\tsub\tw9, w6, #48\n\tcbz\tw4, .L5\n\tsub\tw8, w6, #65\n\tand\tw8, w8, 255\n\tcmp\tw8, 5\n\tbhi\t.L5\n\tsub\tw9, w6, #55\n.L5:\n\tmadd\tw3, w3, w7, w9\n\tadd\tx2, x2, 1\n\tb\t.L4\n\t.cfi_endproc\n\n", ".global ParseInt\n.type ParseInt, %function\nParseInt:\n.LFB23:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tcmp\tw2, 45\n\tbeq\t.L18\n\tcmp\tw2, 48\n\tbeq\t.L19\n\tmov\tx4, x0\n\tmov\tw8, 0\n\tmov\tx3, 0\n\tmov\tw10, 1\n\tmov\tw9, 10\n.L3:\n\tcbz\tw2, .L12\n.L4:\n\tcmp\tx3, x1, sxtw\n\tsxtw\tx7, w1\n\tbge\t.L12\n\tmov\tw5, 0\n\tb\t.L8\n\t.p2align 2,,3\n.L7:\n\tble\t.L16\n.L8:\n\tsub\tw3, w2, #65\n\tcmp\tw8, 0\n\tand\tw3, w3, 255\n\tsub\tw6, w2, #55\n\tccmp\tw3, 5, 2, ne\n\tsub\tw1, w2, #48\n\tldrb\tw2, [x4, 1]!\n\tcsel\tw1, w1, w6, hi\n\tsub\tx3, x4, x0\n\tmadd\tw5, w9, w5, w1\n\tcmp\tx7, x3\n\tcbnz\tw2, .L7\n.L16:\n\tmul\tw0, w5, w10\n\tret\n\t.p2align 2,,3\n.L19:\n\tldrb\tw3, [x0, 1]\n\tcmp\tw3, 120\n\tbeq\t.L20\n\tmov\tx4, x0\n\tmov\tw8, 0\n\tmov\tx3, 0\n\tmov\tw10, 1\n\tmov\tw9, 10\n\tb\t.L4\n\t.p2align 2,,3\n.L18:\n\tldrb\tw2, [x0, 1]\n\tadd\tx4, x0, 1\n\tmov\tw8, 0\n\tmov\tx3, 1\n\tmov\tw10, -1\n\tmov\tw9, 10\n\tb\t.L3\n.L20:\n\tmov\tw8, 1\n\tldrb\tw2, [x0, 2]\n\tadd\tx4, x0, 2\n\tmov\tw10, w8\n\tmov\tx3, 2\n\tmov\tw9, 16\n\tb\t.L3\n\t.p2align 2,,3\n.L12:\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": [ "\"k\"", "69" ], "var": [ "str", "len" ] }, { "value": [ "\"zsvkdapfv\"", "19" ], "var": [ "str", "len" ] }, { "value": [ "\"dnfkxhkwbxernhyajkh\"", "30" ], "var": [ "str", "len" ] }, { "value": [ "\"b\"", "91" ], "var": [ "str", "len" ] }, { "value": [ "\"eblvpaajzkuaqmnhflhby\"", "102" ], "var": [ "str", "len" ] }, { "value": [ "\"slllwxdyexkwivlhczoqhnia\"", "79" ], "var": [ "str", "len" ] }, { "value": [ "\"hjfzwwffaker\"", "110" ], "var": [ "str", "len" ] }, { "value": [ "\"pwvntpabexkqsxrlbzqwpi\"", "51" ], "var": [ "str", "len" ] }, { "value": [ "\"vcglldomesbjfktyeaygmywbkamvo\"", "34" ], "var": [ "str", "len" ] }, { "value": [ "\"foobzmffxtqffasl\"", "10" ], "var": [ "str", "len" ] } ], "output": [ { "value": [ "59", "\"k\"" ], "var": [ "returnv", "str" ] }, { "value": [ "-443458582", "\"zsvkdapfv\"" ], "var": [ "returnv", "str" ] }, { "value": [ "-1344750426", "\"dnfkxhkwbxernhyajkh\"" ], "var": [ "returnv", "str" ] }, { "value": [ "50", "\"b\"" ], "var": [ "returnv", "str" ] }, { "value": [ "-1892224547", "\"eblvpaajzkuaqmnhflhby\"" ], "var": [ "returnv", "str" ] }, { "value": [ "905610195", "\"slllwxdyexkwivlhczoqhnia\"" ], "var": [ "returnv", "str" ] }, { "value": [ "1599514408", "\"hjfzwwffaker\"" ], "var": [ "returnv", "str" ] }, { "value": [ "1952458813", "\"pwvntpabexkqsxrlbzqwpi\"" ], "var": [ "returnv", "str" ] }, { "value": [ "-1299099801", "\"vcglldomesbjfktyeaygmywbkamvo\"" ], "var": [ "returnv", "str" ] }, { "value": [ "858528044", "\"foobzmffxtqffasl\"" ], "var": [ "returnv", "str" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_586r6ywq3e.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* str, int len, int returnv) { json output_json; output_json["str"] = str; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* str = strdup(input_json["str"].get<std::string>().c_str()); int len = input_json["len"]; clock_t begin = clock(); int returnv = ParseInt(str, len); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(str, len, returnv); }
master
null
{"livein": ["str", "len"], "liveout": ["str"], "returnvarname": ["returnv"], "execcmd": "", "funname": "ParseInt", "funargs": ["str", "len"], "typemap": {"str": "string", "len": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_586r6ywq3e.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
jbush001/NyuziProcessor/tests/whole-program/meteor-contest-noverilator.c
int triple_is_okay(char row1, char row2, char row3, int even) { if(even) { return ((row1 == 0x03) && (row2 == 0x0B) && ((row3 & 0x1C) == 0x0C)) || ((row1 == 0x01) && (row2 == 0x05) && (row3 == 0x06)) || ((row1 == 0x19) && (row2 == 0x11)) || ((row1 == 0x15) && (row2 == 0x11)); } else { return ((row1 == 0x13) && (row2 == 0x11)) || ((row1 == 0x15) && (row2 == 0x11)); } }
int triple_is_okay(charrow1, charrow2, charrow3, inteven)
int triple_is_okay(char row1, char row2, char row3, int even)
triple_is_okay
[ "int", "char", "char", "char", "int" ]
{ "code": [ ".globl triple_is_okay\n.type triple_is_okay, @function\ntriple_is_okay:\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%edx, %eax\n\tmovl\t%ecx, -16(%rbp)\n\tmovl\t%edi, %edx\n\tmovb\t%dl, -4(%rbp)\n\tmovl\t%esi, %edx\n\tmovb\t%dl, -8(%rbp)\n\tmovb\t%al, -12(%rbp)\n\tcmpl\t$0, -16(%rbp)\n\tje\t.L2\n\tcmpb\t$3, -4(%rbp)\n\tjne\t.L3\n\tcmpb\t$11, -8(%rbp)\n\tjne\t.L3\n\tmovsbl\t-12(%rbp), %eax\n\tandl\t$28, %eax\n\tcmpl\t$12, %eax\n\tje\t.L4\n.L3:\n\tcmpb\t$1, -4(%rbp)\n\tjne\t.L5\n\tcmpb\t$5, -8(%rbp)\n\tjne\t.L5\n\tcmpb\t$6, -12(%rbp)\n\tje\t.L4\n.L5:\n\tcmpb\t$25, -4(%rbp)\n\tjne\t.L6\n\tcmpb\t$17, -8(%rbp)\n\tje\t.L4\n.L6:\n\tcmpb\t$21, -4(%rbp)\n\tjne\t.L7\n\tcmpb\t$17, -8(%rbp)\n\tjne\t.L7\n.L4:\n\tmovl\t$1, %eax\n\tjmp\t.L9\n.L7:\n\tmovl\t$0, %eax\n\tjmp\t.L9\n.L2:\n\tcmpb\t$19, -4(%rbp)\n\tjne\t.L10\n\tcmpb\t$17, -8(%rbp)\n\tje\t.L11\n.L10:\n\tcmpb\t$21, -4(%rbp)\n\tjne\t.L12\n\tcmpb\t$17, -8(%rbp)\n\tjne\t.L12\n.L11:\n\tmovl\t$1, %eax\n\tjmp\t.L9\n.L12:\n\tmovl\t$0, %eax\n.L9:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl triple_is_okay\n.type triple_is_okay, @function\ntriple_is_okay:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%ecx, %ecx\n\tje\t.L2\n\tcmpb\t$3, %dil\n\tjne\t.L3\n\tcmpb\t$11, %sil\n\tjne\t.L3\n\tandl\t$28, %edx\n\tmovl\t$1, %eax\n\tcmpb\t$12, %dl\n\tjne\t.L5\n\tret\n.L3:\n\tcmpb\t$5, %sil\n\tsete\t%cl\n\tcmpb\t$6, %dl\n\tsete\t%al\n\ttestb\t%al, %cl\n\tje\t.L5\n\tmovl\t$1, %eax\n\tcmpb\t$1, %dil\n\tje\t.L1\n.L5:\n\tsubl\t$21, %edi\n\tandb\t$-5, %dil\n\tjmp\t.L18\n.L2:\n\tsubl\t$19, %edi\n\tandb\t$-3, %dil\n.L18:\n\tsete\t%dl\n\txorl\t%eax, %eax\n\tcmpb\t$17, %sil\n\tsete\t%al\n\tandl\t%edx, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl triple_is_okay\n.type triple_is_okay, @function\ntriple_is_okay:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%ecx, %ecx\n\tje\t.L2\n\tcmpb\t$3, %dil\n\tjne\t.L3\n\tcmpb\t$11, %sil\n\tjne\t.L3\n\tandl\t$28, %edx\n\txorl\t%eax, %eax\n\tcmpb\t$12, %dl\n\tsete\t%al\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tcmpb\t$1, %dil\n\tjne\t.L6\n\tcmpb\t$5, %sil\n\tjne\t.L6\n\txorl\t%eax, %eax\n\tcmpb\t$6, %dl\n\tsete\t%al\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tsubl\t$19, %edi\n\tandl\t$253, %edi\n\tsete\t%dl\n\txorl\t%eax, %eax\n\tcmpb\t$17, %sil\n\tsete\t%al\n\tandl\t%edx, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tcmpb\t$17, %sil\n\tsete\t%dl\n\tcmpb\t$25, %dil\n\tjne\t.L11\n\ttestb\t%dl, %dl\n\tje\t.L11\n\tmovl\t$1, %eax\n\tret\n.L11:\n\txorl\t%eax, %eax\n\tcmpb\t$21, %dil\n\tsete\t%al\n\tandl\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".global triple_is_okay\n.type triple_is_okay, %function\ntriple_is_okay:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tstrb\tw1, [sp, 14]\n\tstrb\tw2, [sp, 13]\n\tstr\tw3, [sp, 8]\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 0\n\tbeq\t.L2\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 3\n\tbne\t.L3\n\tldrb\tw0, [sp, 14]\n\tcmp\tw0, 11\n\tbne\t.L3\n\tldrb\tw0, [sp, 13]\n\tand\tw0, w0, 28\n\tcmp\tw0, 12\n\tbeq\t.L4\n.L3:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 1\n\tbne\t.L5\n\tldrb\tw0, [sp, 14]\n\tcmp\tw0, 5\n\tbne\t.L5\n\tldrb\tw0, [sp, 13]\n\tcmp\tw0, 6\n\tbeq\t.L4\n.L5:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 25\n\tbne\t.L6\n\tldrb\tw0, [sp, 14]\n\tcmp\tw0, 17\n\tbeq\t.L4\n.L6:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 21\n\tbne\t.L7\n\tldrb\tw0, [sp, 14]\n\tcmp\tw0, 17\n\tbne\t.L7\n.L4:\n\tmov\tw0, 1\n\tb\t.L9\n.L7:\n\tmov\tw0, 0\n\tb\t.L9\n.L2:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 19\n\tbne\t.L10\n\tldrb\tw0, [sp, 14]\n\tcmp\tw0, 17\n\tbeq\t.L11\n.L10:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 21\n\tbne\t.L12\n\tldrb\tw0, [sp, 14]\n\tcmp\tw0, 17\n\tbne\t.L12\n.L11:\n\tmov\tw0, 1\n\tb\t.L9\n.L12:\n\tmov\tw0, 0\n.L9:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global triple_is_okay\n.type triple_is_okay, %function\ntriple_is_okay:\n.LFB24:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tand\tw1, w1, 255\n\tand\tw2, w2, 255\n\tcbz\tw3, .L2\n\tcmp\tw0, 3\n\tccmp\tw1, 11, 0, eq\n\tbne\t.L3\n\tand\tw2, w2, 28\n\tcmp\tw2, 12\n.L13:\n\tbeq\t.L7\n.L5:\n\tcmp\tw0, 25\n.L11:\n\tccmp\tw0, 21, 4, ne\n\tccmp\tw1, 17, 0, eq\n\tcset\tw0, eq\n.L1:\n\tret\n.L3:\n\tcmp\tw0, 1\n\tccmp\tw1, 5, 0, eq\n\tbne\t.L5\n\tcmp\tw2, 6\n\tb\t.L13\n.L2:\n\tcmp\tw0, 19\n\tb\t.L11\n.L7:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global triple_is_okay\n.type triple_is_okay, %function\ntriple_is_okay:\n.LFB39:\n\t.cfi_startproc\n\tand\tw4, w0, 255\n\tand\tw1, w1, 255\n\tand\tw2, w2, 255\n\tcbz\tw3, .L2\n\tcmp\tw4, 3\n\tccmp\tw1, 11, 0, eq\n\tbeq\t.L11\n\tcmp\tw4, 1\n\tccmp\tw1, 5, 0, eq\n\tbne\t.L6\n\tcmp\tw2, 6\n\tcset\tw0, eq\n.L1:\n\tret\n\t.p2align 2,,3\n.L11:\n\tand\tw2, w2, 28\n\tcmp\tw2, 12\n\tcset\tw0, eq\n\tret\n\t.p2align 2,,3\n.L2:\n\tsub\tw4, w4, #19\n\tmov\tw0, 253\n\ttst\tw4, w0\n\tccmp\tw1, 17, 0, eq\n\tcset\tw0, eq\n\tret\n\t.p2align 2,,3\n.L6:\n\tcmp\tw1, 17\n\tmov\tw0, 1\n\tcset\tw1, eq\n\tcmp\tw1, 0\n\tccmp\tw4, 25, 0, ne\n\tbeq\t.L1\n\tcmp\tw1, 0\n\tccmp\tw4, 21, 0, ne\n\tcset\tw0, eq\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <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": [ "107", "6", "25", "40" ], "var": [ "row1", "row2", "row3", "even" ] }, { "value": [ "94", "77", "50", "41" ], "var": [ "row1", "row2", "row3", "even" ] }, { "value": [ "120", "102", "44", "19" ], "var": [ "row1", "row2", "row3", "even" ] }, { "value": [ "95", "49", "124", "58" ], "var": [ "row1", "row2", "row3", "even" ] }, { "value": [ "93", "87", "51", "103" ], "var": [ "row1", "row2", "row3", "even" ] }, { "value": [ "97", "88", "115", "25" ], "var": [ "row1", "row2", "row3", "even" ] }, { "value": [ "96", "36", "75", "68" ], "var": [ "row1", "row2", "row3", "even" ] }, { "value": [ "1", "5", "49", "100" ], "var": [ "row1", "row2", "row3", "even" ] }, { "value": [ "67", "29", "79", "114" ], "var": [ "row1", "row2", "row3", "even" ] }, { "value": [ "30", "53", "28", "78" ], "var": [ "row1", "row2", "row3", "even" ] } ], "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_60dkcgbzcb.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 row1, char row2, char row3, int even, 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 row1 = input_json["row1"].get<char>(); char row2 = input_json["row2"].get<char>(); char row3 = input_json["row3"].get<char>(); int even = input_json["even"]; clock_t begin = clock(); int returnv = triple_is_okay(row1, row2, row3, even); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(row1, row2, row3, even, returnv); }
master
null
{"livein": ["row1", "row2", "row3", "even"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "triple_is_okay", "funargs": ["row1", "row2", "row3", "even"], "typemap": {"row1": "int8", "row2": "int8", "row3": "int8", "even": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60dkcgbzcb.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
michaeljklein/CPlug/src/cex3/simple_tests.c
unsigned long int unsignedlongint_ignoring_unsignedshort(unsigned long int x, unsigned short y){return x;}
unsigned long unsignedlongint_ignoring_unsignedshort(unsigned longx, unsigned shorty)
unsigned long int unsignedlongint_ignoring_unsignedshort(unsigned long int x, unsigned short y)
unsignedlongint_ignoring_unsignedshort
[ "unsigned long", "unsigned long", "unsigned short" ]
{ "code": [ ".globl unsignedlongint_ignoring_unsignedshort\n.type unsignedlongint_ignoring_unsignedshort, @function\nunsignedlongint_ignoring_unsignedshort:\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, %eax\n\tmovw\t%ax, -12(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl unsignedlongint_ignoring_unsignedshort\n.type unsignedlongint_ignoring_unsignedshort, @function\nunsignedlongint_ignoring_unsignedshort:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tret\n\t.cfi_endproc\n\n", ".globl unsignedlongint_ignoring_unsignedshort\n.type unsignedlongint_ignoring_unsignedshort, @function\nunsignedlongint_ignoring_unsignedshort:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tret\n\t.cfi_endproc\n\n", ".global unsignedlongint_ignoring_unsignedshort\n.type unsignedlongint_ignoring_unsignedshort, %function\nunsignedlongint_ignoring_unsignedshort:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tstrh\tw1, [sp, 6]\n\tldr\tx0, [sp, 8]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global unsignedlongint_ignoring_unsignedshort\n.type unsignedlongint_ignoring_unsignedshort, %function\nunsignedlongint_ignoring_unsignedshort:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global unsignedlongint_ignoring_unsignedshort\n.type unsignedlongint_ignoring_unsignedshort, %function\nunsignedlongint_ignoring_unsignedshort:\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": [ "295", "395" ], "var": [ "x", "y" ] }, { "value": [ "634", "527" ], "var": [ "x", "y" ] }, { "value": [ "91", "849" ], "var": [ "x", "y" ] }, { "value": [ "945", "898" ], "var": [ "x", "y" ] }, { "value": [ "355", "536" ], "var": [ "x", "y" ] }, { "value": [ "916", "582" ], "var": [ "x", "y" ] }, { "value": [ "764", "567" ], "var": [ "x", "y" ] }, { "value": [ "780", "373" ], "var": [ "x", "y" ] }, { "value": [ "650", "693" ], "var": [ "x", "y" ] }, { "value": [ "852", "965" ], "var": [ "x", "y" ] } ], "output": [ { "value": [ "295" ], "var": [ "returnv" ] }, { "value": [ "634" ], "var": [ "returnv" ] }, { "value": [ "91" ], "var": [ "returnv" ] }, { "value": [ "945" ], "var": [ "returnv" ] }, { "value": [ "355" ], "var": [ "returnv" ] }, { "value": [ "916" ], "var": [ "returnv" ] }, { "value": [ "764" ], "var": [ "returnv" ] }, { "value": [ "780" ], "var": [ "returnv" ] }, { "value": [ "650" ], "var": [ "returnv" ] }, { "value": [ "852" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_3204yxvz6i.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(unsigned long int x, unsigned short y, unsigned long int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); unsigned long int x = input_json["x"]; unsigned short y = input_json["y"]; clock_t begin = clock(); unsigned long int returnv = unsignedlongint_ignoring_unsignedshort(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": "unsignedlongint_ignoring_unsignedshort", "funargs": ["x", "y"], "typemap": {"x": "uint64", "y": "uint16", "returnv": "uint64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_3204yxvz6i.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LuckyBro/sgfork/code/null/null_main.c
void Sys_mkdir ( const char *path ) { }
void Sys_mkdir(const char *path)
void Sys_mkdir ( const char *path )
Sys_mkdir
[ "void", "const char *" ]
{ "code": [ ".globl Sys_mkdir\n.type Sys_mkdir, @function\nSys_mkdir:\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 Sys_mkdir\n.type Sys_mkdir, @function\nSys_mkdir:\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 Sys_mkdir\n.type Sys_mkdir, @function\nSys_mkdir:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl Sys_mkdir\n.type Sys_mkdir, @function\nSys_mkdir:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl Sys_mkdir\n.type Sys_mkdir, @function\nSys_mkdir:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl Sys_mkdir\n.type Sys_mkdir, @function\nSys_mkdir:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global Sys_mkdir\n.type Sys_mkdir, %function\nSys_mkdir:\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 Sys_mkdir\n.type Sys_mkdir, %function\nSys_mkdir:\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 Sys_mkdir\n.type Sys_mkdir, %function\nSys_mkdir:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global Sys_mkdir\n.type Sys_mkdir, %function\nSys_mkdir:\n.LFB13:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global Sys_mkdir\n.type Sys_mkdir, %function\nSys_mkdir:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global Sys_mkdir\n.type Sys_mkdir, %function\nSys_mkdir:\n.LFB23:\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 */
#include <errno.h> #include <stdio.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": [ "\"dgizugvybhoeupbzmztrfnr\"" ], "var": [ "path" ] }, { "value": [ "\"cuxuwvzblr\"" ], "var": [ "path" ] }, { "value": [ "\"tezepmoviwzt\"" ], "var": [ "path" ] }, { "value": [ "\"mycvkszztzqcgmkoakmtkowzgjgec\"" ], "var": [ "path" ] }, { "value": [ "\"blujdgs\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"gnnvmawwgdxvulyedkbtjh\"" ], "var": [ "path" ] }, { "value": [ "\"lprclijonk\"" ], "var": [ "path" ] }, { "value": [ "\"pvfbeydhqgfzbldgxcy\"" ], "var": [ "path" ] }, { "value": [ "\"qhtraolsxokrxucnxehswh\"" ], "var": [ "path" ] }, { "value": [ "\"dgizugvybhoeupbzmztrfnr\"" ], "var": [ "path" ] }, { "value": [ "\"cuxuwvzblr\"" ], "var": [ "path" ] }, { "value": [ "\"tezepmoviwzt\"" ], "var": [ "path" ] }, { "value": [ "\"mycvkszztzqcgmkoakmtkowzgjgec\"" ], "var": [ "path" ] }, { "value": [ "\"blujdgs\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"gnnvmawwgdxvulyedkbtjh\"" ], "var": [ "path" ] }, { "value": [ "\"lprclijonk\"" ], "var": [ "path" ] }, { "value": [ "\"pvfbeydhqgfzbldgxcy\"" ], "var": [ "path" ] }, { "value": [ "\"qhtraolsxokrxucnxehswh\"" ], "var": [ "path" ] }, { "value": [ "\"dgizugvybhoeupbzmztrfnr\"" ], "var": [ "path" ] }, { "value": [ "\"cuxuwvzblr\"" ], "var": [ "path" ] }, { "value": [ "\"tezepmoviwzt\"" ], "var": [ "path" ] }, { "value": [ "\"mycvkszztzqcgmkoakmtkowzgjgec\"" ], "var": [ "path" ] }, { "value": [ "\"blujdgs\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"gnnvmawwgdxvulyedkbtjh\"" ], "var": [ "path" ] }, { "value": [ "\"lprclijonk\"" ], "var": [ "path" ] }, { "value": [ "\"pvfbeydhqgfzbldgxcy\"" ], "var": [ "path" ] }, { "value": [ "\"qhtraolsxokrxucnxehswh\"" ], "var": [ "path" ] } ], "output": [ { "value": [ "\"dgizugvybhoeupbzmztrfnr\"" ], "var": [ "path" ] }, { "value": [ "\"cuxuwvzblr\"" ], "var": [ "path" ] }, { "value": [ "\"tezepmoviwzt\"" ], "var": [ "path" ] }, { "value": [ "\"mycvkszztzqcgmkoakmtkowzgjgec\"" ], "var": [ "path" ] }, { "value": [ "\"blujdgs\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"gnnvmawwgdxvulyedkbtjh\"" ], "var": [ "path" ] }, { "value": [ "\"lprclijonk\"" ], "var": [ "path" ] }, { "value": [ "\"pvfbeydhqgfzbldgxcy\"" ], "var": [ "path" ] }, { "value": [ "\"qhtraolsxokrxucnxehswh\"" ], "var": [ "path" ] }, { "value": [ "\"dgizugvybhoeupbzmztrfnr\"" ], "var": [ "path" ] }, { "value": [ "\"cuxuwvzblr\"" ], "var": [ "path" ] }, { "value": [ "\"tezepmoviwzt\"" ], "var": [ "path" ] }, { "value": [ "\"mycvkszztzqcgmkoakmtkowzgjgec\"" ], "var": [ "path" ] }, { "value": [ "\"blujdgs\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"gnnvmawwgdxvulyedkbtjh\"" ], "var": [ "path" ] }, { "value": [ "\"lprclijonk\"" ], "var": [ "path" ] }, { "value": [ "\"pvfbeydhqgfzbldgxcy\"" ], "var": [ "path" ] }, { "value": [ "\"qhtraolsxokrxucnxehswh\"" ], "var": [ "path" ] }, { "value": [ "\"dgizugvybhoeupbzmztrfnr\"" ], "var": [ "path" ] }, { "value": [ "\"cuxuwvzblr\"" ], "var": [ "path" ] }, { "value": [ "\"tezepmoviwzt\"" ], "var": [ "path" ] }, { "value": [ "\"mycvkszztzqcgmkoakmtkowzgjgec\"" ], "var": [ "path" ] }, { "value": [ "\"blujdgs\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"gnnvmawwgdxvulyedkbtjh\"" ], "var": [ "path" ] }, { "value": [ "\"lprclijonk\"" ], "var": [ "path" ] }, { "value": [ "\"pvfbeydhqgfzbldgxcy\"" ], "var": [ "path" ] }, { "value": [ "\"qhtraolsxokrxucnxehswh\"" ], "var": [ "path" ] } ] }
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"dgizugvybhoeupbzmztrfnr\"" ], "var": [ "path" ] }, { "value": [ "\"cuxuwvzblr\"" ], "var": [ "path" ] }, { "value": [ "\"tezepmoviwzt\"" ], "var": [ "path" ] }, { "value": [ "\"mycvkszztzqcgmkoakmtkowzgjgec\"" ], "var": [ "path" ] }, { "value": [ "\"blujdgs\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"gnnvmawwgdxvulyedkbtjh\"" ], "var": [ "path" ] }, { "value": [ "\"lprclijonk\"" ], "var": [ "path" ] }, { "value": [ "\"pvfbeydhqgfzbldgxcy\"" ], "var": [ "path" ] }, { "value": [ "\"qhtraolsxokrxucnxehswh\"" ], "var": [ "path" ] } ], "output": [ { "value": [ "\"dgizugvybhoeupbzmztrfnr\"" ], "var": [ "path" ] }, { "value": [ "\"cuxuwvzblr\"" ], "var": [ "path" ] }, { "value": [ "\"tezepmoviwzt\"" ], "var": [ "path" ] }, { "value": [ "\"mycvkszztzqcgmkoakmtkowzgjgec\"" ], "var": [ "path" ] }, { "value": [ "\"blujdgs\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"gnnvmawwgdxvulyedkbtjh\"" ], "var": [ "path" ] }, { "value": [ "\"lprclijonk\"" ], "var": [ "path" ] }, { "value": [ "\"pvfbeydhqgfzbldgxcy\"" ], "var": [ "path" ] }, { "value": [ "\"qhtraolsxokrxucnxehswh\"" ], "var": [ "path" ] } ] }
extern "C" { #include "/run/user/1000/pytmpfile_jordiws_3577729fiogidme.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* path) { json output_json; output_json["path"] = path; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* path = strdup(input_json["path"].get<std::string>().c_str()); clock_t begin = clock(); Sys_mkdir(path); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(path); }
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_329ss7rog8.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* path) { json output_json; output_json["path"] = path; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* path = strdup(input_json["path"].get<std::string>().c_str()); clock_t begin = clock(); Sys_mkdir(path); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(path); }
master
null
{"livein": ["path"], "liveout": ["path"], "returnvarname": [], "execcmd": "", "funname": "Sys_mkdir", "funargs": ["path"], "typemap": {"path": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_329ss7rog8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
briwilcox/c_and_recursion_intro/exercise1_solution.c
double add_precise(double x, double y) { return (x + y); }
double add_precise(doublex, doubley)
double add_precise(double x, double y)
add_precise
[ "double", "double", "double" ]
{ "code": [ ".globl add_precise\n.type add_precise, @function\nadd_precise:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t%xmm1, -16(%rbp)\n\tmovsd\t-8(%rbp), %xmm0\n\taddsd\t-16(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl add_precise\n.type add_precise, @function\nadd_precise:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\taddsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl add_precise\n.type add_precise, @function\nadd_precise:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\taddsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global add_precise\n.type add_precise, %function\nadd_precise:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tstr\td1, [sp]\n\tldr\td1, [sp, 8]\n\tldr\td0, [sp]\n\tfadd\td0, d1, d0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global add_precise\n.type add_precise, %function\nadd_precise:\n.LFB13:\n\t.cfi_startproc\n\tfadd\td0, d0, d1\n\tret\n\t.cfi_endproc\n\n", ".global add_precise\n.type add_precise, %function\nadd_precise:\n.LFB23:\n\t.cfi_startproc\n\tfadd\td0, d0, d1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <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": [ "66.5947480771", "66.1135448407" ], "var": [ "x", "y" ] }, { "value": [ "9.27896655372", "33.1750157117" ], "var": [ "x", "y" ] }, { "value": [ "11.6848651509", "28.3839947754" ], "var": [ "x", "y" ] }, { "value": [ "94.8261130844", "52.0765908733" ], "var": [ "x", "y" ] }, { "value": [ "10.2981409358", "31.3575577112" ], "var": [ "x", "y" ] }, { "value": [ "38.7785992787", "49.4720696806" ], "var": [ "x", "y" ] }, { "value": [ "59.4831085401", "35.9701766373" ], "var": [ "x", "y" ] }, { "value": [ "61.6359932464", "35.1101756905" ], "var": [ "x", "y" ] }, { "value": [ "77.4041196709", "34.5586246749" ], "var": [ "x", "y" ] }, { "value": [ "39.3753901895", "69.4016495189" ], "var": [ "x", "y" ] } ], "output": [ { "value": [ "132.7082929178" ], "var": [ "returnv" ] }, { "value": [ "42.453982265419995" ], "var": [ "returnv" ] }, { "value": [ "40.0688599263" ], "var": [ "returnv" ] }, { "value": [ "146.9027039577" ], "var": [ "returnv" ] }, { "value": [ "41.655698646999994" ], "var": [ "returnv" ] }, { "value": [ "88.2506689593" ], "var": [ "returnv" ] }, { "value": [ "95.4532851774" ], "var": [ "returnv" ] }, { "value": [ "96.7461689369" ], "var": [ "returnv" ] }, { "value": [ "111.9627443458" ], "var": [ "returnv" ] }, { "value": [ "108.7770397084" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_482gk6fg_z.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(double x, double y, double returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); double x = input_json["x"]; double y = input_json["y"]; clock_t begin = clock(); double returnv = add_precise(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": "add_precise", "funargs": ["x", "y"], "typemap": {"x": "float64", "y": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_482gk6fg_z.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_125() { return 125; }
int do_125()
int do_125()
do_125
[ "int", "" ]
{ "code": [ ".globl do_125\n.type do_125, @function\ndo_125:\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$125, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_125\n.type do_125, @function\ndo_125:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$125, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_125\n.type do_125, @function\ndo_125:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$125, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_125\n.type do_125, %function\ndo_125:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 125\n\tret\n\t.cfi_endproc\n\n", ".global do_125\n.type do_125, %function\ndo_125:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 125\n\tret\n\t.cfi_endproc\n\n", ".global do_125\n.type do_125, %function\ndo_125:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 125\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "125" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_536z2za3ao.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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_125(); clock_t end = 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_125", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_536z2za3ao.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
urmyfaith/roadofios/diary/solveoutlines/stage_test_week1/1418-1419-1420/06.c
int is_contain_star_or_sharp(const char *str) { int flag =0; char *p = (char *)str; while(*p != '\0') { if(*p=='*' || *p =='#') { flag = 1; break; } p++; } return flag; }
int is_contain_star_or_sharp(const char *str)
int is_contain_star_or_sharp(const char *str)
is_contain_star_or_sharp
[ "int", "const char *" ]
{ "code": [ ".globl is_contain_star_or_sharp\n.type is_contain_star_or_sharp, @function\nis_contain_star_or_sharp:\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, -12(%rbp)\n\tmovq\t-24(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L2\n.L6:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$42, %al\n\tje\t.L3\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$35, %al\n\tjne\t.L4\n.L3:\n\tmovl\t$1, -12(%rbp)\n\tjmp\t.L5\n.L4:\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.L6\n.L5:\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 is_contain_star_or_sharp\n.type is_contain_star_or_sharp, @function\nis_contain_star_or_sharp:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n.L2:\n\tmovb\t(%rdi), %al\n\ttestb\t%al, %al\n\tje\t.L7\n\tcmpb\t$42, %al\n\tje\t.L5\n\tcmpb\t$35, %al\n\tje\t.L5\n\tincq\t%rdi\n\tjmp\t.L2\n.L7:\n\txorl\t%eax, %eax\n\tret\n.L5:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl is_contain_star_or_sharp\n.type is_contain_star_or_sharp, @function\nis_contain_star_or_sharp:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tjmp\t.L7\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tcmpb\t$42, %al\n\tje\t.L5\n\tcmpb\t$35, %al\n\tje\t.L5\n\taddq\t$1, %rdi\n.L7:\n\tmovzbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tjne\t.L3\n\txorl\t%eax, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global is_contain_star_or_sharp\n.type is_contain_star_or_sharp, %function\nis_contain_star_or_sharp:\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, 20]\n\tldr\tx0, [sp, 8]\n\tstr\tx0, [sp, 24]\n\tb\t.L2\n.L6:\n\tldr\tx0, [sp, 24]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 42\n\tbeq\t.L3\n\tldr\tx0, [sp, 24]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 35\n\tbne\t.L4\n.L3:\n\tmov\tw0, 1\n\tstr\tw0, [sp, 20]\n\tb\t.L5\n.L4:\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.L6\n.L5:\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 is_contain_star_or_sharp\n.type is_contain_star_or_sharp, %function\nis_contain_star_or_sharp:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw2, 35\n.L2:\n\tldrb\tw1, [x0]\n\tcbnz\tw1, .L4\n\tmov\tw0, 0\n.L1:\n\tret\n.L4:\n\tcmp\tw1, 42\n\tccmp\tw1, w2, 4, ne\n\tbeq\t.L5\n\tadd\tx0, x0, 1\n\tb\t.L2\n.L5:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global is_contain_star_or_sharp\n.type is_contain_star_or_sharp, %function\nis_contain_star_or_sharp:\n.LFB23:\n\t.cfi_startproc\n\tldrb\tw1, [x0]\n\tcbz\tw1, .L4\n\tmov\tw2, 35\n\tb\t.L3\n\t.p2align 2,,3\n.L8:\n\tldrb\tw1, [x0, 1]!\n\tcbz\tw1, .L4\n.L3:\n\tcmp\tw1, 42\n\tccmp\tw1, w2, 4, ne\n\tbne\t.L8\n\tmov\tw0, 1\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#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_63c_oiov39.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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_contain_star_or_sharp(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_contain_star_or_sharp", "funargs": ["str"], "typemap": {"str": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63c_oiov39.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
makrutenko/dunovo/seqtools.c
char get_char_comp(char c) { int i = c - 65; if (i < 0 || i > 57) { return c; } else { return "TVGHEFCDIJMLKNOPQYWAABSXRZ[\\]^_`tvghefcdijmlknopqywaabsxrz"[i]; } }
char get_char_comp(charc)
char get_char_comp(char c)
get_char_comp
[ "char", "char" ]
{ "code": [ ".globl get_char_comp\n.type get_char_comp, @function\nget_char_comp:\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, -20(%rbp)\n\tmovsbl\t-20(%rbp), %eax\n\tsubl\t$65, %eax\n\tmovl\t%eax, -4(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tjs\t.L2\n\tcmpl\t$57, -4(%rbp)\n\tjle\t.L3\n.L2:\n\tmovzbl\t-20(%rbp), %eax\n\tjmp\t.L4\n.L3:\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tleaq\t.LC0(%rip), %rdx\n\tmovzbl\t(%rax,%rdx), %eax\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"TVGHEFCDIJMLKNOPQYWAABSXRZ[\\\\]^_`tvghefcdijmlknopqywaabsxrz\"\n", ".globl get_char_comp\n.type get_char_comp, @function\nget_char_comp:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovsbl\t%dil, %edi\n\tsubl\t$65, %edi\n\tcmpl\t$57, %edi\n\tja\t.L2\n\tmovslq\t%edi, %rdi\n\tleaq\t.LC0(%rip), %rax\n\tmovb\t(%rax,%rdi), %al\n.L2:\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"TVGHEFCDIJMLKNOPQYWAABSXRZ[\\\\]^_`tvghefcdijmlknopqywaabsxrz\"\n", ".globl get_char_comp\n.type get_char_comp, @function\nget_char_comp:\n.LFB29:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovsbl\t%dil, %edi\n\tsubl\t$65, %edi\n\tcmpl\t$57, %edi\n\tja\t.L2\n\tmovslq\t%edi, %rdi\n\tleaq\t.LC0(%rip), %rax\n\tmovzbl\t(%rax,%rdi), %eax\n.L2:\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"TVGHEFCDIJMLKNOPQYWAABSXRZ[\\\\]^_`tvghefcdijmlknopqywaabsxrz\"\n", ".global get_char_comp\n.type get_char_comp, %function\nget_char_comp:\n.LFB6:\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, #65\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tblt\t.L2\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 57\n\tble\t.L3\n.L2:\n\tldrb\tw0, [sp, 15]\n\tb\t.L4\n.L3:\n\tadrp\tx0, .LC0\n\tadd\tx1, x0, :lo12:.LC0\n\tldrsw\tx0, [sp, 28]\n\tldrb\tw0, [x1, x0]\n.L4:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"TVGHEFCDIJMLKNOPQYWAABSXRZ[\\\\]^_`tvghefcdijmlknopqywaabsxrz\"\n", ".global get_char_comp\n.type get_char_comp, %function\nget_char_comp:\n.LFB22:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw1, w0, #65\n\tcmp\tw1, 57\n\tbhi\t.L2\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tldrb\tw0, [x0, w1, sxtw]\n.L2:\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"TVGHEFCDIJMLKNOPQYWAABSXRZ[\\\\]^_`tvghefcdijmlknopqywaabsxrz\"\n", ".global get_char_comp\n.type get_char_comp, %function\nget_char_comp:\n.LFB29:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw1, w0, #65\n\tcmp\tw1, 57\n\tbhi\t.L2\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tldrb\tw0, [x0, w1, sxtw]\n.L2:\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"TVGHEFCDIJMLKNOPQYWAABSXRZ[\\\\]^_`tvghefcdijmlknopqywaabsxrz\"\n" ], "target": [ "real_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 <string.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": [ "2" ], "var": [ "c" ] }, { "value": [ "75" ], "var": [ "c" ] }, { "value": [ "111" ], "var": [ "c" ] }, { "value": [ "123" ], "var": [ "c" ] }, { "value": [ "67" ], "var": [ "c" ] }, { "value": [ "54" ], "var": [ "c" ] }, { "value": [ "64" ], "var": [ "c" ] }, { "value": [ "49" ], "var": [ "c" ] }, { "value": [ "31" ], "var": [ "c" ] }, { "value": [ "31" ], "var": [ "c" ] } ], "output": [ { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "77" ], "var": [ "returnv" ] }, { "value": [ "111" ], "var": [ "returnv" ] }, { "value": [ "123" ], "var": [ "returnv" ] }, { "value": [ "71" ], "var": [ "returnv" ] }, { "value": [ "54" ], "var": [ "returnv" ] }, { "value": [ "64" ], "var": [ "returnv" ] }, { "value": [ "49" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_33o2_9xjzr.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char c, char returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char c = input_json["c"].get<char>(); clock_t begin = clock(); char returnv = get_char_comp(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": "get_char_comp", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33o2_9xjzr.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ZHYfeng/malicious-code-conceal/0_mailcious-code/useful/c_linux/brundle/src/syscalls.h
static inline int close(int fd) { long __res; __asm__ volatile ("int $0x80" : "=a" (__res) : "0" (6),"b" ((long)(fd))); do { if ((unsigned long)(__res) >= (unsigned long)(-125)) { __res = -1; } return (int) (__res); } while (0); }
int close(intfd)
int close(int fd)
close
[ "int", "int" ]
{ "code": [ ".globl close\n.type close, @function\nclose:\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\t.cfi_offset 3, -24\n\tmovl\t%edi, -28(%rbp)\n\tmovl\t-28(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovl\t$6, %eax\n\tmovq\t%rdx, %rbx\n\tint $0x80\n\tmovq\t%rax, -16(%rbp)\n\tmovq\t-16(%rbp), %rax\n\tcmpq\t$-126, %rax\n\tjbe\t.L2\n\tmovq\t$-1, -16(%rbp)\n.L2:\n\tmovq\t-16(%rbp), %rax\n\tpopq\t%rbx\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\n", ".globl close\n.type close, @function\n\n", null, ".global close\n.type close, %function\n\n", ".global close\n.type close, %function\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "8" ], "var": [ "fd" ] }, { "value": [ "78" ], "var": [ "fd" ] }, { "value": [ "24" ], "var": [ "fd" ] }, { "value": [ "66" ], "var": [ "fd" ] }, { "value": [ "40" ], "var": [ "fd" ] }, { "value": [ "12" ], "var": [ "fd" ] }, { "value": [ "6" ], "var": [ "fd" ] }, { "value": [ "114" ], "var": [ "fd" ] }, { "value": [ "113" ], "var": [ "fd" ] }, { "value": [ "104" ], "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_38s98dt12h.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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_38s98dt12h.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
hnal/ex30/ex30.c
int renan(int x) { return x+21; }
int renan(intx)
int renan(int x)
renan
[ "int", "int" ]
{ "code": [ ".globl renan\n.type renan, @function\nrenan:\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$21, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl renan\n.type renan, @function\nrenan:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t21(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl renan\n.type renan, @function\nrenan:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t21(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global renan\n.type renan, %function\nrenan:\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, 21\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global renan\n.type renan, %function\nrenan:\n.LFB13:\n\t.cfi_startproc\n\tadd\tw0, w0, 21\n\tret\n\t.cfi_endproc\n\n", ".global renan\n.type renan, %function\nrenan:\n.LFB23:\n\t.cfi_startproc\n\tadd\tw0, w0, 21\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "42" ], "var": [ "x" ] }, { "value": [ "97" ], "var": [ "x" ] }, { "value": [ "121" ], "var": [ "x" ] }, { "value": [ "102" ], "var": [ "x" ] }, { "value": [ "91" ], "var": [ "x" ] }, { "value": [ "42" ], "var": [ "x" ] }, { "value": [ "23" ], "var": [ "x" ] }, { "value": [ "52" ], "var": [ "x" ] }, { "value": [ "11" ], "var": [ "x" ] }, { "value": [ "63" ], "var": [ "x" ] } ], "output": [ { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "118" ], "var": [ "returnv" ] }, { "value": [ "142" ], "var": [ "returnv" ] }, { "value": [ "123" ], "var": [ "returnv" ] }, { "value": [ "112" ], "var": [ "returnv" ] }, { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "44" ], "var": [ "returnv" ] }, { "value": [ "73" ], "var": [ "returnv" ] }, { "value": [ "32" ], "var": [ "returnv" ] }, { "value": [ "84" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_45w5uoqs9_.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = renan(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": "renan", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45w5uoqs9_.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
raad00/uQlust-ver2.0/binary/RNA/fpair_sub.c
double rad2deg(double ang) { return ang * 180.0 / 3.141592653589793; }
double rad2deg(doubleang)
double rad2deg(double ang)
rad2deg
[ "double", "double" ]
{ "code": [ ".globl rad2deg\n.type rad2deg, @function\nrad2deg:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t-8(%rbp), %xmm1\n\tmovsd\t.LC0(%rip), %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmovsd\t.LC1(%rip), %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t1413754136\n", ".globl rad2deg\n.type rad2deg, @function\nrad2deg:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmulsd\t.LC0(%rip), %xmm0\n\tdivsd\t.LC1(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t1413754136\n", ".globl rad2deg\n.type rad2deg, @function\nrad2deg:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\tmulsd\t.LC0(%rip), %xmm0\n\tdivsd\t.LC1(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t1413754136\n", ".global rad2deg\n.type rad2deg, %function\nrad2deg:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tldr\td0, [sp, 8]\n\tmov\tx0, 140737488355328\n\tmovk\tx0, 0x4066, lsl 48\n\tfmov\td1, x0\n\tfmul\td0, d0, d1\n\tadrp\tx0, .LC0\n\tldr\td1, [x0, #:lo12:.LC0]\n\tfdiv\td0, d0, d1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t1413754136\n", ".global rad2deg\n.type rad2deg, %function\nrad2deg:\n.LFB35:\n\t.cfi_startproc\n\tmov\tx0, 140737488355328\n\tmovk\tx0, 0x4066, lsl 48\n\tfmov\td1, x0\n\tadrp\tx0, .LC0\n\tfmul\td0, d0, d1\n\tldr\td1, [x0, #:lo12:.LC0]\n\tfdiv\td0, d0, d1\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t1413754136\n", ".global rad2deg\n.type rad2deg, %function\nrad2deg:\n.LFB52:\n\t.cfi_startproc\n\tmov\tx0, 140737488355328\n\tmovk\tx0, 0x4066, lsl 48\n\tfmov\td1, x0\n\tadrp\tx0, .LC0\n\tfmul\td0, d0, d1\n\tldr\td2, [x0, #:lo12:.LC0]\n\tfdiv\td0, d0, d2\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t1413754136\n" ], "target": [ "real_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 <errno.h> #include <string.h> #include <ctype.h> #include <math.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": [ "52.7468478719" ], "var": [ "ang" ] }, { "value": [ "99.8832016357" ], "var": [ "ang" ] }, { "value": [ "82.8567437283" ], "var": [ "ang" ] }, { "value": [ "92.289269431" ], "var": [ "ang" ] }, { "value": [ "82.3646906914" ], "var": [ "ang" ] }, { "value": [ "75.0122224282" ], "var": [ "ang" ] }, { "value": [ "8.83611301353" ], "var": [ "ang" ] }, { "value": [ "44.451863913" ], "var": [ "ang" ] }, { "value": [ "86.8215282487" ], "var": [ "ang" ] }, { "value": [ "84.7590261862" ], "var": [ "ang" ] } ], "output": [ { "value": [ "3022.171765678478" ], "var": [ "returnv" ] }, { "value": [ "5722.885897979811" ], "var": [ "returnv" ] }, { "value": [ "4747.341719828643" ], "var": [ "returnv" ] }, { "value": [ "5287.785632742024" ], "var": [ "returnv" ] }, { "value": [ "4719.149157517679" ], "var": [ "returnv" ] }, { "value": [ "4297.883757032437" ], "var": [ "returnv" ] }, { "value": [ "506.2719829758923" ], "var": [ "returnv" ] }, { "value": [ "2546.9041937047887" ], "var": [ "returnv" ] }, { "value": [ "4974.507139526364" ], "var": [ "returnv" ] }, { "value": [ "4856.334476108086" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_55riwp1jbx.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 ang, 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 ang = input_json["ang"]; clock_t begin = clock(); double returnv = rad2deg(ang); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(ang, returnv); }
master
null
{"livein": ["ang"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "rad2deg", "funargs": ["ang"], "typemap": {"ang": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55riwp1jbx.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Lw-Cui/LCC/test.c
int diff(char a, int b) { putchar(98); if (a > b) return a - b; else return 1 + diff(b, a); }
int diff(chara, intb)
int diff(char a, int b)
diff
[ "int", "char", "int" ]
{ "code": [ ".globl diff\n.type diff, @function\ndiff:\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, %eax\n\tmovl\t%esi, -8(%rbp)\n\tmovb\t%al, -4(%rbp)\n\tmovl\t$98, %edi\n\tcall\tputchar@PLT\n\tmovsbl\t-4(%rbp), %eax\n\tcmpl\t%eax, -8(%rbp)\n\tjge\t.L2\n\tmovsbl\t-4(%rbp), %eax\n\tsubl\t-8(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovsbl\t-4(%rbp), %edx\n\tmovl\t-8(%rbp), %eax\n\tmovsbl\t%al, %eax\n\tmovl\t%edx, %esi\n\tmovl\t%eax, %edi\n\tcall\tdiff\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 diff\n.type diff, @function\ndiff:\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, %eax\n\tmovl\t%esi, -8(%rbp)\n\tmovb\t%al, -4(%rbp)\n\tmovl\t$98, %edi\n\tcall\tputchar@PLT\n\tmovsbl\t-4(%rbp), %eax\n\tcmpl\t%eax, -8(%rbp)\n\tjge\t.L2\n\tmovsbl\t-4(%rbp), %eax\n\tsubl\t-8(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovsbl\t-4(%rbp), %edx\n\tmovl\t-8(%rbp), %eax\n\tmovsbl\t%al, %eax\n\tmovl\t%edx, %esi\n\tmovl\t%eax, %edi\n\tcall\tdiff\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 diff\n.type diff, @function\ndiff:\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\tmovl\t%esi, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 3, -24\n\tmovl\t%edi, %ebx\n\tmovl\t$98, %edi\n\tpushq\t%rcx\n\t.cfi_def_cfa_offset 32\n\tcall\tputchar@PLT\n\tmovsbl\t%bl, %esi\n\tcmpl\t%ebp, %esi\n\tjle\t.L2\n\tmovl\t%esi, %eax\n\tsubl\t%ebp, %eax\n\tjmp\t.L1\n.L2:\n\tmovsbl\t%bpl, %edi\n\tcall\tdiff\n\tincl\t%eax\n.L1:\n\tpopq\t%rdx\n\t.cfi_def_cfa_offset 24\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 16\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".globl diff\n.type diff, @function\ndiff:\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\tmovl\t%esi, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 3, -24\n\tmovl\t%edi, %ebx\n\tmovl\t$98, %edi\n\tpushq\t%rcx\n\t.cfi_def_cfa_offset 32\n\tcall\tputchar@PLT\n\tmovsbl\t%bl, %esi\n\tcmpl\t%ebp, %esi\n\tjle\t.L2\n\tmovl\t%esi, %eax\n\tsubl\t%ebp, %eax\n\tjmp\t.L1\n.L2:\n\tmovsbl\t%bpl, %edi\n\tcall\tdiff\n\tincl\t%eax\n.L1:\n\tpopq\t%rdx\n\t.cfi_def_cfa_offset 24\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 16\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".globl diff\n.type diff, @function\ndiff:\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\tmovl\t%esi, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 3, -24\n\tmovl\t%edi, %ebx\n\tmovl\t$98, %edi\n\tsubq\t$8, %rsp\n\t.cfi_def_cfa_offset 32\n\tcall\tputchar@PLT\n\tmovsbl\t%bl, %esi\n\tcmpl\t%ebp, %esi\n\tjle\t.L2\n\taddq\t$8, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 24\n\tmovl\t%esi, %eax\n\tsubl\t%ebp, %eax\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 16\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\t.cfi_restore_state\n\tmovsbl\t%bpl, %edi\n\tcall\tdiff\n\taddq\t$8, %rsp\n\t.cfi_def_cfa_offset 24\n\taddl\t$1, %eax\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 16\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".globl diff\n.type diff, @function\ndiff:\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\tmovl\t%esi, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 3, -24\n\tmovl\t%edi, %ebx\n\tmovl\t$98, %edi\n\tsubq\t$8, %rsp\n\t.cfi_def_cfa_offset 32\n\tcall\tputchar@PLT\n\tmovsbl\t%bl, %esi\n\tcmpl\t%ebp, %esi\n\tjle\t.L2\n\taddq\t$8, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 24\n\tmovl\t%esi, %eax\n\tsubl\t%ebp, %eax\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 16\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\t.cfi_restore_state\n\tmovsbl\t%bpl, %edi\n\tcall\tdiff\n\taddq\t$8, %rsp\n\t.cfi_def_cfa_offset 24\n\taddl\t$1, %eax\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 16\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".global diff\n.type diff, %function\ndiff:\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\tstrb\tw0, [sp, 31]\n\tstr\tw1, [sp, 24]\n\tmov\tw0, 98\n\tbl\tputchar\n\tldrb\tw0, [sp, 31]\n\tldr\tw1, [sp, 24]\n\tcmp\tw1, w0\n\tbge\t.L2\n\tldrb\tw1, [sp, 31]\n\tldr\tw0, [sp, 24]\n\tsub\tw0, w1, w0\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 24]\n\tand\tw2, w0, 255\n\tldrb\tw0, [sp, 31]\n\tmov\tw1, w0\n\tmov\tw0, w2\n\tbl\tdiff\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 diff\n.type diff, %function\ndiff:\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\tstrb\tw0, [sp, 31]\n\tstr\tw1, [sp, 24]\n\tmov\tw0, 98\n\tbl\tputchar\n\tldrb\tw0, [sp, 31]\n\tldr\tw1, [sp, 24]\n\tcmp\tw1, w0\n\tbge\t.L2\n\tldrb\tw1, [sp, 31]\n\tldr\tw0, [sp, 24]\n\tsub\tw0, w1, w0\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 24]\n\tand\tw2, w0, 255\n\tldrb\tw0, [sp, 31]\n\tmov\tw1, w0\n\tmov\tw0, w2\n\tbl\tdiff\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 diff\n.type diff, %function\ndiff:\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\tand\tw19, w0, 255\n\tmov\tw20, w1\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -16\n\t.cfi_offset 22, -8\n\tmov\tw21, 0\n.L3:\n\tmov\tw0, 98\n\tbl\tputchar\n\tmov\tw22, w21\n\tmov\tw0, w19\n\tadd\tw21, w21, 1\n\tcmp\tw19, w20\n\tble\t.L2\n\tsub\tw0, w19, w20\n\tadd\tw0, w0, w22\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.L2:\n\t.cfi_restore_state\n\tand\tw19, w20, 255\n\tmov\tw20, w0\n\tb\t.L3\n\t.cfi_endproc\n\n", ".global diff\n.type diff, %function\ndiff:\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\tand\tw19, w0, 255\n\tmov\tw20, w1\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -16\n\t.cfi_offset 22, -8\n\tmov\tw21, 0\n.L3:\n\tmov\tw0, 98\n\tbl\tputchar\n\tmov\tw22, w21\n\tmov\tw0, w19\n\tadd\tw21, w21, 1\n\tcmp\tw19, w20\n\tble\t.L2\n\tsub\tw0, w19, w20\n\tadd\tw0, w0, w22\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.L2:\n\t.cfi_restore_state\n\tand\tw19, w20, 255\n\tmov\tw20, w0\n\tb\t.L3\n\t.cfi_endproc\n\n", ".global diff\n.type diff, %function\ndiff:\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\tand\tw19, w0, 255\n\tmov\tw20, w1\n\tstr\tx21, [sp, 32]\n\t.cfi_offset 21, -16\n\tmov\tw21, 0\n\tb\t.L3\n\t.p2align 2,,3\n.L2:\n\tand\tw19, w20, 255\n\tmov\tw20, w1\n.L3:\n\tmov\tw0, 98\n\tbl\tputchar\n\tmov\tw0, w21\n\tcmp\tw19, w20\n\tmov\tw1, w19\n\tadd\tw21, w21, 1\n\tble\t.L2\n\tsub\tw19, w19, w20\n\tadd\tw0, w19, w0\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 diff\n.type diff, %function\ndiff:\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\tand\tw19, w0, 255\n\tmov\tw20, w1\n\tstr\tx21, [sp, 32]\n\t.cfi_offset 21, -16\n\tmov\tw21, 0\n\tb\t.L3\n\t.p2align 2,,3\n.L2:\n\tand\tw19, w20, 255\n\tmov\tw20, w1\n.L3:\n\tmov\tw0, 98\n\tbl\tputchar\n\tmov\tw0, w21\n\tcmp\tw19, w20\n\tmov\tw1, w19\n\tadd\tw21, w21, 1\n\tble\t.L2\n\tsub\tw19, w19, w20\n\tadd\tw0, w19, w0\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" ], "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 /*<<< orphan*/ putchar (int) ;
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "116", "44" ], "var": [ "a", "b" ] }, { "value": [ "84", "100" ], "var": [ "a", "b" ] }, { "value": [ "59", "103" ], "var": [ "a", "b" ] }, { "value": [ "31", "95" ], "var": [ "a", "b" ] }, { "value": [ "47", "79" ], "var": [ "a", "b" ] }, { "value": [ "50", "61" ], "var": [ "a", "b" ] }, { "value": [ "119", "50" ], "var": [ "a", "b" ] }, { "value": [ "13", "5" ], "var": [ "a", "b" ] }, { "value": [ "33", "75" ], "var": [ "a", "b" ] }, { "value": [ "55", "33" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "72" ], "var": [ "returnv" ] }, { "value": [ "17" ], "var": [ "returnv" ] }, { "value": [ "45" ], "var": [ "returnv" ] }, { "value": [ "65" ], "var": [ "returnv" ] }, { "value": [ "33" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "69" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "43" ], "var": [ "returnv" ] }, { "value": [ "22" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_5934kzx_ne.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 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); char a = input_json["a"].get<char>(); int b = input_json["b"]; clock_t begin = clock(); int returnv = diff(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": "diff", "funargs": ["a", "b"], "typemap": {"a": "int8", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_5934kzx_ne.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
tiagoft/MCx02/MC202/05-heap.c
int pai(int N) { return ((N-1)/2); }
int pai(intN)
int pai(int N)
pai
[ "int", "int" ]
{ "code": [ ".globl pai\n.type pai, @function\npai:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$1, %eax\n\tmovl\t%eax, %edx\n\tshrl\t$31, %edx\n\taddl\t%edx, %eax\n\tsarl\t%eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl pai\n.type pai, @function\npai:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-1(%rdi), %eax\n\tmovl\t$2, %ecx\n\tcltd\n\tidivl\t%ecx\n\tret\n\t.cfi_endproc\n\n", ".globl pai\n.type pai, @function\npai:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$1, %edi\n\tmovl\t%edi, %eax\n\tshrl\t$31, %eax\n\taddl\t%edi, %eax\n\tsarl\t%eax\n\tret\n\t.cfi_endproc\n\n", ".global pai\n.type pai, %function\npai:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tsub\tw0, w0, #1\n\tlsr\tw1, w0, 31\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global pai\n.type pai, %function\npai:\n.LFB13:\n\t.cfi_startproc\n\tsub\tw0, w0, #1\n\tmov\tw1, 2\n\tsdiv\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global pai\n.type pai, %function\npai:\n.LFB23:\n\t.cfi_startproc\n\tsub\tw0, w0, #1\n\tadd\tw0, w0, w0, lsr 31\n\tasr\tw0, w0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "110" ], "var": [ "N" ] }, { "value": [ "56" ], "var": [ "N" ] }, { "value": [ "44" ], "var": [ "N" ] }, { "value": [ "124" ], "var": [ "N" ] }, { "value": [ "101" ], "var": [ "N" ] }, { "value": [ "89" ], "var": [ "N" ] }, { "value": [ "16" ], "var": [ "N" ] }, { "value": [ "75" ], "var": [ "N" ] }, { "value": [ "7" ], "var": [ "N" ] }, { "value": [ "60" ], "var": [ "N" ] } ], "output": [ { "value": [ "54" ], "var": [ "returnv" ] }, { "value": [ "27" ], "var": [ "returnv" ] }, { "value": [ "21" ], "var": [ "returnv" ] }, { "value": [ "61" ], "var": [ "returnv" ] }, { "value": [ "50" ], "var": [ "returnv" ] }, { "value": [ "44" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "37" ], "var": [ "returnv" ] }, { "value": [ "3" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_62ouv883ze.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = pai(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": "pai", "funargs": ["N"], "typemap": {"N": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62ouv883ze.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
DeadDork/learning_c/experiments/factorial_1.c
int factorial(int number) { return number * ((number > 1) ? factorial(number - 1) : 1); }
int factorial(intnumber)
int factorial(int number)
factorial
[ "int", "int" ]
{ "code": [ ".globl factorial\n.type factorial, @function\nfactorial:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$1, -4(%rbp)\n\tjle\t.L2\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$1, %eax\n\tmovl\t%eax, %edi\n\tcall\tfactorial\n\tjmp\t.L3\n.L2:\n\tmovl\t$1, %eax\n.L3:\n\timull\t-4(%rbp), %eax\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl factorial\n.type factorial, @function\nfactorial:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n.L3:\n\timull\t%edi, %eax\n\tcmpl\t$1, %edi\n\tjle\t.L1\n\tdecl\t%edi\n\tjmp\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl factorial\n.type factorial, @function\nfactorial:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t$1, %edi\n\tjle\t.L4\n\tmovl\t$1, %eax\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t%edi, %edx\n\tsubl\t$1, %edi\n\timull\t%edx, %eax\n\tcmpl\t$1, %edi\n\tjne\t.L3\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global factorial\n.type factorial, %function\nfactorial:\n.LFB6:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -32]!\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 29, -32\n\t.cfi_offset 30, -24\n\tmov\tx29, sp\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 1\n\tble\t.L2\n\tldr\tw0, [sp, 28]\n\tsub\tw0, w0, #1\n\tbl\tfactorial\n\tb\t.L3\n.L2:\n\tmov\tw0, 1\n.L3:\n\tldr\tw1, [sp, 28]\n\tmul\tw0, w0, 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 factorial\n.type factorial, %function\nfactorial:\n.LFB24:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw0, 1\n.L3:\n\tmul\tw0, w0, w1\n\tcmp\tw1, 1\n\tble\t.L1\n\tsub\tw1, w1, #1\n\tb\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global factorial\n.type factorial, %function\nfactorial:\n.LFB39:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tcmp\tw0, 1\n\tble\t.L1\n\tsub\tw0, w0, #2\n\tsub\tw1, w2, #1\n\tcmp\tw0, 17\n\tbls\t.L8\n\tadrp\tx0, .LC0\n\tdup\tv1.4s, w2\n\tmovi\tv0.4s, 0x1\n\tlsr\tw3, w1, 2\n\tldr\tq2, [x0, #:lo12:.LC0]\n\tmov\tw0, 0\n\tmvni\tv3.4s, 0x3\n\tadd\tv1.4s, v1.4s, v2.4s\n\t.p2align 3,,7\n.L4:\n\tmov\tv2.16b, v1.16b\n\tadd\tw0, w0, 1\n\tadd\tv1.4s, v1.4s, v3.4s\n\tcmp\tw0, w3\n\tmul\tv0.4s, v0.4s, v2.4s\n\tbne\t.L4\n\tmovi\tv1.4s, 0\n\tand\tw0, w1, -4\n\tsub\tw2, w2, w0\n\tcmp\tw1, w0\n\text\tv2.16b, v0.16b, v1.16b, #8\n\tmul\tv0.4s, v0.4s, v2.4s\n\text\tv1.16b, v0.16b, v1.16b, #4\n\tmul\tv0.4s, v0.4s, v1.4s\n\tumov\tw0, v0.s[0]\n\tbeq\t.L1\n\tsub\tw1, w2, #1\n\t.p2align 3,,7\n.L6:\n\tmov\tw3, w2\n\tcmp\tw1, 1\n\tmov\tw2, w1\n\tsub\tw1, w1, #1\n\tmul\tw0, w0, w3\n\tbne\t.L6\n.L1:\n\tret\n.L8:\n\tmov\tw0, 1\n\tb\t.L6\n\t.cfi_endproc\n.LC0: \t.word\t0\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "31" ], "var": [ "number" ] }, { "value": [ "108" ], "var": [ "number" ] }, { "value": [ "43" ], "var": [ "number" ] }, { "value": [ "98" ], "var": [ "number" ] }, { "value": [ "79" ], "var": [ "number" ] }, { "value": [ "93" ], "var": [ "number" ] }, { "value": [ "31" ], "var": [ "number" ] }, { "value": [ "6" ], "var": [ "number" ] }, { "value": [ "53" ], "var": [ "number" ] }, { "value": [ "72" ], "var": [ "number" ] } ], "output": [ { "value": [ "738197504" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "738197504" ], "var": [ "returnv" ] }, { "value": [ "720" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_40gp0hmf1d.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 number, 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 number = input_json["number"]; clock_t begin = clock(); int returnv = factorial(number); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(number, returnv); }
master
null
{"livein": ["number"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "factorial", "funargs": ["number"], "typemap": {"number": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_40gp0hmf1d.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
maciejgaleja/HF-AQMM/firmware/src/params.c
int params__is_list_delim_char(char c) { return (c == ','); }
int params__is_list_delim_char(charc)
int params__is_list_delim_char(char c)
params__is_list_delim_char
[ "int", "char" ]
{ "code": [ ".globl params__is_list_delim_char\n.type params__is_list_delim_char, @function\nparams__is_list_delim_char:\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$44, -4(%rbp)\n\tsete\t%al\n\tmovzbl\t%al, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl params__is_list_delim_char\n.type params__is_list_delim_char, @function\nparams__is_list_delim_char:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpb\t$44, %dil\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl params__is_list_delim_char\n.type params__is_list_delim_char, @function\nparams__is_list_delim_char:\n.LFB34:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpb\t$44, %dil\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n", ".global params__is_list_delim_char\n.type params__is_list_delim_char, %function\nparams__is_list_delim_char:\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, 44\n\tcset\tw0, eq\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 params__is_list_delim_char\n.type params__is_list_delim_char, %function\nparams__is_list_delim_char:\n.LFB24:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tcmp\tw0, 44\n\tcset\tw0, eq\n\tret\n\t.cfi_endproc\n\n", ".global params__is_list_delim_char\n.type params__is_list_delim_char, %function\nparams__is_list_delim_char:\n.LFB34:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tcmp\tw0, 44\n\tcset\tw0, eq\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <string.h> # 1
null
{ "dummy_funcs": [ null, 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" ], "var": [ "c" ] }, { "value": [ "99" ], "var": [ "c" ] }, { "value": [ "92" ], "var": [ "c" ] }, { "value": [ "87" ], "var": [ "c" ] }, { "value": [ "81" ], "var": [ "c" ] }, { "value": [ "74" ], "var": [ "c" ] }, { "value": [ "121" ], "var": [ "c" ] }, { "value": [ "120" ], "var": [ "c" ] }, { "value": [ "72" ], "var": [ "c" ] }, { "value": [ "113" ], "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_60hg6dmsjr.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = params__is_list_delim_char(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); }
develop
null
{"livein": ["c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "params__is_list_delim_char", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60hg6dmsjr.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_669() { return 669; }
int do_669()
int do_669()
do_669
[ "int", "" ]
{ "code": [ ".globl do_669\n.type do_669, @function\ndo_669:\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$669, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_669\n.type do_669, @function\ndo_669:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$669, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_669\n.type do_669, @function\ndo_669:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$669, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_669\n.type do_669, %function\ndo_669:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 669\n\tret\n\t.cfi_endproc\n\n", ".global do_669\n.type do_669, %function\ndo_669:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 669\n\tret\n\t.cfi_endproc\n\n", ".global do_669\n.type do_669, %function\ndo_669:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 669\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_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": [ "669" ], "var": [ "returnv" ] }, { "value": [ "669" ], "var": [ "returnv" ] }, { "value": [ "669" ], "var": [ "returnv" ] }, { "value": [ "669" ], "var": [ "returnv" ] }, { "value": [ "669" ], "var": [ "returnv" ] }, { "value": [ "669" ], "var": [ "returnv" ] }, { "value": [ "669" ], "var": [ "returnv" ] }, { "value": [ "669" ], "var": [ "returnv" ] }, { "value": [ "669" ], "var": [ "returnv" ] }, { "value": [ "669" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53_9t2w2rb.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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_669(); clock_t end = 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_669", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53_9t2w2rb.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
elsys/po-homework/G/02/21/task3.c
int is_in_bound(int *arr, int size, int *ptr) { if(arr > ptr || (arr+size-1) < ptr) { return 0; } else { return 1; } }
int is_in_bound(int *arr, intsize, int *ptr)
int is_in_bound(int *arr, int size, int *ptr)
is_in_bound
[ "int", "int *", "int", "int *" ]
{ "code": [ ".globl is_in_bound\n.type is_in_bound, @function\nis_in_bound:\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\tmovq\t%rdx, -24(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tcmpq\t-24(%rbp), %rax\n\tja\t.L2\n\tmovl\t-12(%rbp), %eax\n\tcltq\n\tsalq\t$2, %rax\n\tleaq\t-4(%rax), %rdx\n\tmovq\t-8(%rbp), %rax\n\taddq\t%rdx, %rax\n\tcmpq\t%rax, -24(%rbp)\n\tjbe\t.L3\n.L2:\n\tmovl\t$0, %eax\n\tjmp\t.L4\n.L3:\n\tmovl\t$1, %eax\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl is_in_bound\n.type is_in_bound, @function\nis_in_bound:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpq\t%rdx, %rdi\n\tja\t.L1\n\tmovslq\t%esi, %rsi\n\tleaq\t-4(%rdi,%rsi,4), %rax\n\tcmpq\t%rax, %rdx\n\tsetbe\t%al\n\tmovzbl\t%al, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl is_in_bound\n.type is_in_bound, @function\nis_in_bound:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpq\t%rdx, %rdi\n\tja\t.L1\n\tmovslq\t%esi, %rsi\n\tleaq\t-4(%rdi,%rsi,4), %rax\n\tcmpq\t%rax, %rdx\n\tsetbe\t%al\n\tmovzbl\t%al, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global is_in_bound\n.type is_in_bound, %function\nis_in_bound:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 24]\n\tstr\tw1, [sp, 20]\n\tstr\tx2, [sp, 8]\n\tldr\tx1, [sp, 24]\n\tldr\tx0, [sp, 8]\n\tcmp\tx1, x0\n\tbhi\t.L2\n\tldrsw\tx0, [sp, 20]\n\tlsl\tx0, x0, 2\n\tsub\tx0, x0, #4\n\tldr\tx1, [sp, 24]\n\tadd\tx0, x1, x0\n\tldr\tx1, [sp, 8]\n\tcmp\tx1, x0\n\tbls\t.L3\n.L2:\n\tmov\tw0, 0\n\tb\t.L4\n.L3:\n\tmov\tw0, 1\n.L4:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global is_in_bound\n.type is_in_bound, %function\nis_in_bound:\n.LFB13:\n\t.cfi_startproc\n\tcmp\tx0, x2\n\tbhi\t.L3\n\tadd\tx1, x0, x1, sxtw 2\n\tsub\tx1, x1, #4\n\tcmp\tx2, x1\n\tcset\tw0, ls\n.L1:\n\tret\n.L3:\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global is_in_bound\n.type is_in_bound, %function\nis_in_bound:\n.LFB23:\n\t.cfi_startproc\n\tcmp\tx0, x2\n\tbhi\t.L3\n\tadd\tx1, x0, x1, sxtw 2\n\tsub\tx1, x1, #4\n\tcmp\tx2, x1\n\tcset\tw0, ls\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> # 1
null
{ "dummy_funcs": [ null, 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, 7, 122, 55, 115, 33, 65, 20, 46, 69, 98, 2, 122, 102, 108, 53, 93, 120, 34, 68, 61, 83, 123, 86, 32, 125, 94, 103, 96, 9, 4, 0]", "14", "[104, 94, 3, 44, 118, 66, 83, 74, 13, 82, 51, 25, 51, 90, 122, 36, 1, 23, 15, 115, 30, 61, 91, 13, 89, 38, 88, 19, 55, 118, 46, 51]" ], "var": [ "arr", "size", "ptr" ] }, { "value": [ "[2, 38, 36, 126, 23, 116, 15, 92, 76, 61, 123, 49, 4, 119, 113, 121, 46, 53, 78, 11, 93, 43, 82, 18, 18, 107, 29, 11, 77, 39, 33, 114]", "50", "[5, 105, 97, 71, 76, 84, 31, 38, 52, 26, 25, 33, 57, 13, 56, 118, 18, 89, 100, 46, 72, 76, 22, 6, 38, 17, 112, 121, 46, 99, 2, 83]" ], "var": [ "arr", "size", "ptr" ] }, { "value": [ "[113, 33, 98, 102, 18, 62, 75, 51, 106, 33, 85, 2, 105, 63, 76, 45, 122, 92, 34, 67, 49, 90, 97, 38, 63, 32, 72, 59, 72, 24, 22, 25]", "56", "[71, 7, 15, 9, 23, 38, 99, 65, 58, 17, 10, 51, 37, 16, 55, 58, 18, 19, 52, 82, 45, 42, 54, 54, 41, 43, 107, 76, 77, 49, 42, 90]" ], "var": [ "arr", "size", "ptr" ] }, { "value": [ "[17, 9, 15, 19, 13, 98, 64, 29, 57, 27, 9, 59, 41, 44, 57, 117, 32, 37, 70, 54, 60, 7, 49, 126, 60, 61, 70, 93, 119, 15, 70, 108]", "15", "[93, 95, 78, 79, 60, 85, 90, 27, 22, 19, 108, 24, 126, 75, 72, 5, 111, 42, 116, 15, 40, 92, 92, 83, 72, 114, 106, 108, 123, 123, 60, 3]" ], "var": [ "arr", "size", "ptr" ] }, { "value": [ "[73, 52, 30, 89, 99, 91, 29, 117, 31, 10, 14, 126, 57, 31, 22, 81, 80, 101, 36, 97, 42, 8, 47, 30, 25, 66, 26, 118, 102, 16, 60, 34]", "70", "[59, 126, 9, 84, 19, 124, 19, 104, 80, 23, 60, 92, 62, 114, 5, 42, 54, 1, 44, 95, 62, 110, 85, 91, 64, 74, 59, 107, 69, 0, 102, 90]" ], "var": [ "arr", "size", "ptr" ] }, { "value": [ "[48, 98, 54, 114, 7, 86, 1, 114, 50, 97, 82, 9, 24, 56, 67, 29, 50, 41, 13, 91, 97, 82, 48, 50, 9, 68, 122, 61, 10, 73, 5, 119]", "17", "[117, 104, 47, 0, 15, 19, 76, 107, 78, 11, 42, 35, 53, 117, 100, 123, 11, 82, 49, 26, 16, 48, 34, 29, 55, 55, 33, 40, 123, 94, 45, 68]" ], "var": [ "arr", "size", "ptr" ] }, { "value": [ "[69, 110, 35, 89, 66, 46, 36, 20, 47, 116, 123, 43, 68, 7, 89, 0, 10, 40, 103, 15, 122, 112, 126, 24, 49, 10, 30, 38, 44, 76, 126, 86]", "68", "[36, 44, 80, 11, 9, 52, 103, 121, 74, 59, 58, 106, 37, 46, 20, 16, 25, 10, 112, 112, 18, 98, 117, 101, 35, 102, 123, 114, 62, 86, 106, 8]" ], "var": [ "arr", "size", "ptr" ] }, { "value": [ "[18, 72, 10, 114, 5, 79, 71, 46, 65, 67, 96, 27, 93, 10, 125, 92, 105, 2, 83, 26, 4, 2, 4, 55, 52, 93, 5, 99, 74, 41, 15, 59]", "94", "[125, 94, 75, 45, 82, 66, 70, 67, 13, 85, 104, 102, 24, 88, 88, 52, 51, 122, 71, 31, 111, 102, 56, 41, 9, 96, 70, 114, 97, 116, 33, 74]" ], "var": [ "arr", "size", "ptr" ] }, { "value": [ "[10, 83, 7, 109, 81, 76, 45, 62, 118, 122, 8, 54, 58, 74, 86, 123, 121, 121, 31, 83, 126, 103, 110, 6, 122, 77, 102, 78, 26, 4, 26, 113]", "110", "[66, 18, 25, 64, 56, 39, 80, 75, 48, 25, 119, 99, 46, 86, 123, 9, 12, 14, 42, 70, 7, 95, 30, 19, 101, 47, 96, 89, 72, 41, 96, 55]" ], "var": [ "arr", "size", "ptr" ] }, { "value": [ "[92, 18, 77, 67, 46, 12, 95, 92, 97, 5, 15, 96, 104, 64, 9, 101, 95, 90, 109, 97, 119, 123, 56, 34, 113, 71, 65, 98, 55, 47, 107, 19]", "28", "[90, 107, 98, 36, 27, 66, 102, 73, 90, 15, 54, 14, 50, 120, 20, 108, 84, 71, 22, 104, 62, 9, 76, 72, 18, 24, 107, 65, 48, 102, 20, 68]" ], "var": [ "arr", "size", "ptr" ] } ], "output": [ { "value": [ "[85, 7, 122, 55, 115, 33, 65, 20, 46, 69, 98, 2, 122, 102, 108, 53, 93, 120, 34, 68, 61, 83, 123, 86, 32, 125, 94, 103, 96, 9, 4, 0]", "[104, 94, 3, 44, 118, 66, 83, 74, 13, 82, 51, 25, 51, 90, 122, 36, 1, 23, 15, 115, 30, 61, 91, 13, 89, 38, 88, 19, 55, 118, 46, 51]", "0" ], "var": [ "arr", "ptr", "returnv" ] }, { "value": [ "[2, 38, 36, 126, 23, 116, 15, 92, 76, 61, 123, 49, 4, 119, 113, 121, 46, 53, 78, 11, 93, 43, 82, 18, 18, 107, 29, 11, 77, 39, 33, 114]", "[5, 105, 97, 71, 76, 84, 31, 38, 52, 26, 25, 33, 57, 13, 56, 118, 18, 89, 100, 46, 72, 76, 22, 6, 38, 17, 112, 121, 46, 99, 2, 83]", "0" ], "var": [ "arr", "ptr", "returnv" ] }, { "value": [ "[113, 33, 98, 102, 18, 62, 75, 51, 106, 33, 85, 2, 105, 63, 76, 45, 122, 92, 34, 67, 49, 90, 97, 38, 63, 32, 72, 59, 72, 24, 22, 25]", "[71, 7, 15, 9, 23, 38, 99, 65, 58, 17, 10, 51, 37, 16, 55, 58, 18, 19, 52, 82, 45, 42, 54, 54, 41, 43, 107, 76, 77, 49, 42, 90]", "0" ], "var": [ "arr", "ptr", "returnv" ] }, { "value": [ "[17, 9, 15, 19, 13, 98, 64, 29, 57, 27, 9, 59, 41, 44, 57, 117, 32, 37, 70, 54, 60, 7, 49, 126, 60, 61, 70, 93, 119, 15, 70, 108]", "[93, 95, 78, 79, 60, 85, 90, 27, 22, 19, 108, 24, 126, 75, 72, 5, 111, 42, 116, 15, 40, 92, 92, 83, 72, 114, 106, 108, 123, 123, 60, 3]", "0" ], "var": [ "arr", "ptr", "returnv" ] }, { "value": [ "[73, 52, 30, 89, 99, 91, 29, 117, 31, 10, 14, 126, 57, 31, 22, 81, 80, 101, 36, 97, 42, 8, 47, 30, 25, 66, 26, 118, 102, 16, 60, 34]", "[59, 126, 9, 84, 19, 124, 19, 104, 80, 23, 60, 92, 62, 114, 5, 42, 54, 1, 44, 95, 62, 110, 85, 91, 64, 74, 59, 107, 69, 0, 102, 90]", "0" ], "var": [ "arr", "ptr", "returnv" ] }, { "value": [ "[48, 98, 54, 114, 7, 86, 1, 114, 50, 97, 82, 9, 24, 56, 67, 29, 50, 41, 13, 91, 97, 82, 48, 50, 9, 68, 122, 61, 10, 73, 5, 119]", "[117, 104, 47, 0, 15, 19, 76, 107, 78, 11, 42, 35, 53, 117, 100, 123, 11, 82, 49, 26, 16, 48, 34, 29, 55, 55, 33, 40, 123, 94, 45, 68]", "0" ], "var": [ "arr", "ptr", "returnv" ] }, { "value": [ "[69, 110, 35, 89, 66, 46, 36, 20, 47, 116, 123, 43, 68, 7, 89, 0, 10, 40, 103, 15, 122, 112, 126, 24, 49, 10, 30, 38, 44, 76, 126, 86]", "[36, 44, 80, 11, 9, 52, 103, 121, 74, 59, 58, 106, 37, 46, 20, 16, 25, 10, 112, 112, 18, 98, 117, 101, 35, 102, 123, 114, 62, 86, 106, 8]", "0" ], "var": [ "arr", "ptr", "returnv" ] }, { "value": [ "[18, 72, 10, 114, 5, 79, 71, 46, 65, 67, 96, 27, 93, 10, 125, 92, 105, 2, 83, 26, 4, 2, 4, 55, 52, 93, 5, 99, 74, 41, 15, 59]", "[125, 94, 75, 45, 82, 66, 70, 67, 13, 85, 104, 102, 24, 88, 88, 52, 51, 122, 71, 31, 111, 102, 56, 41, 9, 96, 70, 114, 97, 116, 33, 74]", "0" ], "var": [ "arr", "ptr", "returnv" ] }, { "value": [ "[10, 83, 7, 109, 81, 76, 45, 62, 118, 122, 8, 54, 58, 74, 86, 123, 121, 121, 31, 83, 126, 103, 110, 6, 122, 77, 102, 78, 26, 4, 26, 113]", "[66, 18, 25, 64, 56, 39, 80, 75, 48, 25, 119, 99, 46, 86, 123, 9, 12, 14, 42, 70, 7, 95, 30, 19, 101, 47, 96, 89, 72, 41, 96, 55]", "0" ], "var": [ "arr", "ptr", "returnv" ] }, { "value": [ "[92, 18, 77, 67, 46, 12, 95, 92, 97, 5, 15, 96, 104, 64, 9, 101, 95, 90, 109, 97, 119, 123, 56, 34, 113, 71, 65, 98, 55, 47, 107, 19]", "[90, 107, 98, 36, 27, 66, 102, 73, 90, 15, 54, 14, 50, 120, 20, 108, 84, 71, 22, 104, 62, 9, 76, 72, 18, 24, 107, 65, 48, 102, 20, 68]", "0" ], "var": [ "arr", "ptr", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_43afqpnn10.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int* arr, int size, int* ptr, int returnv) { json output_json; std::vector<json> output_temp_3; for (unsigned int i4 = 0; i4 < 32; i4++) { int output_temp_5 = arr[i4]; output_temp_3.push_back(output_temp_5); } output_json["arr"] = output_temp_3; std::vector<json> output_temp_6; for (unsigned int i7 = 0; i7 < 32; i7++) { int output_temp_8 = ptr[i7]; output_temp_6.push_back(output_temp_8); } output_json["ptr"] = output_temp_6; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["arr"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* arr = &input_temp_1_vec[0]; int size = input_json["size"]; std::vector<int> input_temp_2_vec; for (auto& elem : input_json["ptr"]) { int input_temp_2_inner = elem; input_temp_2_vec.push_back(input_temp_2_inner); } int* ptr = &input_temp_2_vec[0]; clock_t begin = clock(); int returnv = is_in_bound(arr, size, ptr); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(arr, size, ptr, returnv); }
master
null
{"livein": ["arr", "size", "ptr"], "liveout": ["arr", "ptr"], "returnvarname": ["returnv"], "execcmd": "", "funname": "is_in_bound", "funargs": ["arr", "size", "ptr"], "typemap": {"arr": "array(int32#32)", "size": "int32", "ptr": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_43afqpnn10.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
boos/cppcheck/test/testsuites/clang/outofbound.c
int symbolic_index(int a) { int x[2] = {1, 2}; if (a == 2) { return x[a]; } return 0; }
int symbolic_index(inta)
int symbolic_index(int a)
symbolic_index
[ "int", "int" ]
{ "code": [ ".globl symbolic_index\n.type symbolic_index, @function\nsymbolic_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$32, %rsp\n\tmovl\t%edi, -20(%rbp)\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovl\t$1, -16(%rbp)\n\tmovl\t$2, -12(%rbp)\n\tcmpl\t$2, -20(%rbp)\n\tjne\t.L2\n\tmovl\t-20(%rbp), %eax\n\tcltq\n\tmovl\t-16(%rbp,%rax,4), %eax\n\tjmp\t.L4\n.L2:\n\tmovl\t$0, %eax\n.L4:\n\tmovq\t-8(%rbp), %rdx\n\txorq\t%fs:40, %rdx\n\tje\t.L5\n\tcall\t__stack_chk_fail@PLT\n.L5:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl symbolic_index\n.type symbolic_index, @function\nsymbolic_index:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40, %rsp\n\t.cfi_def_cfa_offset 48\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 24(%rsp)\n\txorl\t%eax, %eax\n\tcmpl\t$2, %edi\n\tjne\t.L1\n\tmovq\t$0, 8(%rsp)\n\tmovl\t16(%rsp), %eax\n.L1:\n\tmovq\t24(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tje\t.L3\n\tcall\t__stack_chk_fail@PLT\n.L3:\n\taddq\t$40, %rsp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".globl symbolic_index\n.type symbolic_index, @function\nsymbolic_index:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40, %rsp\n\t.cfi_def_cfa_offset 48\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 24(%rsp)\n\txorl\t%eax, %eax\n\tcmpl\t$2, %edi\n\tje\t.L7\n.L1:\n\tmovq\t24(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tjne\t.L8\n\taddq\t$40, %rsp\n\t.cfi_remember_state\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\tmovq\t$0, 8(%rsp)\n\tmovl\t16(%rsp), %eax\n\tjmp\t.L1\n.L8:\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n\n", ".global symbolic_index\n.type symbolic_index, %function\nsymbolic_index:\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\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 40]\n\tmov\tx1,0\n\tmov\tw0, 1\n\tstr\tw0, [sp, 32]\n\tmov\tw0, 2\n\tstr\tw0, [sp, 36]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 2\n\tbne\t.L2\n\tldrsw\tx0, [sp, 28]\n\tlsl\tx0, x0, 2\n\tadd\tx1, sp, 32\n\tldr\tw0, [x1, x0]\n\tb\t.L4\n.L2:\n\tmov\tw0, 0\n.L4:\n\tmov\tw1, w0\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 40]\n\tldr\tx3, [x0]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L5\n\tbl\t__stack_chk_fail\n.L5:\n\tmov\tw0, w1\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 symbolic_index\n.type symbolic_index, %function\nsymbolic_index:\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\tadrp\tx1, :got:__stack_chk_guard\n\tcmp\tw0, 2\n\tmov\tx29, sp\n\tldr\tx2, [x1, #:got_lo12:__stack_chk_guard]\n\tldr\tx3, [x2]\n\tstr\tx3, [sp, 40]\n\tmov\tx3,0\n\tbne\t.L4\n\tldr\tw0, [sp, 32]\n\tstr\txzr, [sp, 24]\n.L1:\n\tldr\tx1, [x1, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 40]\n\tldr\tx3, [x1]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L3\n\tbl\t__stack_chk_fail\n.L4:\n\tmov\tw0, 0\n\tb\t.L1\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 symbolic_index\n.type symbolic_index, %function\nsymbolic_index:\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\tadrp\tx1, :got:__stack_chk_guard\n\tcmp\tw0, 2\n\tmov\tx29, sp\n\tldr\tx2, [x1, #:got_lo12:__stack_chk_guard]\n\tldr\tx3, [x2]\n\tstr\tx3, [sp, 40]\n\tmov\tx3,0\n\tbeq\t.L8\n\tmov\tw0, 0\n.L1:\n\tldr\tx1, [x1, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 40]\n\tldr\tx3, [x1]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbne\t.L9\n\tldp\tx29, x30, [sp], 48\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.L8:\n\t.cfi_restore_state\n\tldr\tw0, [sp, 32]\n\tstr\txzr, [sp, 24]\n\tb\t.L1\n.L9:\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": [ "6" ], "var": [ "a" ] }, { "value": [ "55" ], "var": [ "a" ] }, { "value": [ "46" ], "var": [ "a" ] }, { "value": [ "120" ], "var": [ "a" ] }, { "value": [ "1" ], "var": [ "a" ] }, { "value": [ "92" ], "var": [ "a" ] }, { "value": [ "102" ], "var": [ "a" ] }, { "value": [ "18" ], "var": [ "a" ] }, { "value": [ "52" ], "var": [ "a" ] }, { "value": [ "23" ], "var": [ "a" ] } ], "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_507c8rhctr.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 = symbolic_index(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); }
main
null
{"livein": ["a"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "symbolic_index", "funargs": ["a"], "typemap": {"a": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_507c8rhctr.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
DreamAndDead/CSAPP-3e-Solutions/site/content/chapter3/code/decode2/decode.c
long decode(long x, long y, long z) { long tmp = y - z; return (tmp * x) ^ (tmp << 63 >> 63); }
long decode(longx, longy, longz)
long decode(long x, long y, long z)
decode
[ "long", "long", "long", "long" ]
{ "code": [ ".globl decode\n.type decode, @function\ndecode:\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%rdx, -40(%rbp)\n\tmovq\t-32(%rbp), %rax\n\tsubq\t-40(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n\tmovq\t-8(%rbp), %rax\n\timulq\t-24(%rbp), %rax\n\tmovq\t-8(%rbp), %rdx\n\tsalq\t$63, %rdx\n\tsarq\t$63, %rdx\n\txorq\t%rdx, %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl decode\n.type decode, @function\ndecode:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t%rdx, %rsi\n\tmovq\t%rsi, %rax\n\timulq\t%rdi, %rsi\n\tsalq\t$63, %rax\n\tsarq\t$63, %rax\n\txorq\t%rsi, %rax\n\tret\n\t.cfi_endproc\n\n", ".globl decode\n.type decode, @function\ndecode:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t%rdx, %rsi\n\tmovq\t%rsi, %rax\n\timulq\t%rdi, %rsi\n\tsalq\t$63, %rax\n\tsarq\t$63, %rax\n\txorq\t%rsi, %rax\n\tret\n\t.cfi_endproc\n\n", ".global decode\n.type decode, %function\ndecode:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #48\n\t.cfi_def_cfa_offset 48\n\tstr\tx0, [sp, 24]\n\tstr\tx1, [sp, 16]\n\tstr\tx2, [sp, 8]\n\tldr\tx1, [sp, 16]\n\tldr\tx0, [sp, 8]\n\tsub\tx0, x1, x0\n\tstr\tx0, [sp, 40]\n\tldr\tx1, [sp, 40]\n\tldr\tx0, [sp, 24]\n\tmul\tx1, x1, x0\n\tldr\tx0, [sp, 40]\n\tlsl\tx0, x0, 63\n\tasr\tx0, x0, 63\n\teor\tx0, x1, x0\n\tadd\tsp, sp, 48\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global decode\n.type decode, %function\ndecode:\n.LFB0:\n\t.cfi_startproc\n\tsub\tx1, x1, x2\n\tsbfx\tx2, x1, 0, 1\n\tmul\tx0, x1, x0\n\teor\tx0, x2, x0\n\tret\n\t.cfi_endproc\n\n", ".global decode\n.type decode, %function\ndecode:\n.LFB0:\n\t.cfi_startproc\n\tsub\tx1, x1, x2\n\tsbfx\tx3, x1, 0, 1\n\tmul\tx0, x1, x0\n\teor\tx0, x3, 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
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "53", "22", "111" ], "var": [ "x", "y", "z" ] }, { "value": [ "28", "102", "42" ], "var": [ "x", "y", "z" ] }, { "value": [ "73", "92", "62" ], "var": [ "x", "y", "z" ] }, { "value": [ "33", "64", "44" ], "var": [ "x", "y", "z" ] }, { "value": [ "46", "86", "126" ], "var": [ "x", "y", "z" ] }, { "value": [ "20", "25", "5" ], "var": [ "x", "y", "z" ] }, { "value": [ "85", "88", "89" ], "var": [ "x", "y", "z" ] }, { "value": [ "3", "18", "93" ], "var": [ "x", "y", "z" ] }, { "value": [ "116", "78", "48" ], "var": [ "x", "y", "z" ] }, { "value": [ "34", "84", "25" ], "var": [ "x", "y", "z" ] } ], "output": [ { "value": [ "4716" ], "var": [ "returnv" ] }, { "value": [ "1680" ], "var": [ "returnv" ] }, { "value": [ "2190" ], "var": [ "returnv" ] }, { "value": [ "660" ], "var": [ "returnv" ] }, { "value": [ "-1840" ], "var": [ "returnv" ] }, { "value": [ "400" ], "var": [ "returnv" ] }, { "value": [ "84" ], "var": [ "returnv" ] }, { "value": [ "224" ], "var": [ "returnv" ] }, { "value": [ "3480" ], "var": [ "returnv" ] }, { "value": [ "-2007" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_39a0_zpvfu.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(long int x, long int y, long int z, long int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); long int x = input_json["x"]; long int y = input_json["y"]; long int z = input_json["z"]; clock_t begin = clock(); long int returnv = decode(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": "decode", "funargs": ["x", "y", "z"], "typemap": {"x": "int64", "y": "int64", "z": "int64", "returnv": "int64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_39a0_zpvfu.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
friesencr/easing.h/easing.h
float linearInterpolationf(float p) { return p; }
float linearInterpolationf(floatp)
float linearInterpolationf(float p)
linearInterpolationf
[ "float", "float" ]
{ "code": [ ".globl linearInterpolationf\n.type linearInterpolationf, @function\nlinearInterpolationf:\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\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl linearInterpolationf\n.type linearInterpolationf, @function\nlinearInterpolationf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl linearInterpolationf\n.type linearInterpolationf, @function\nlinearInterpolationf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global linearInterpolationf\n.type linearInterpolationf, %function\nlinearInterpolationf:\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\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global linearInterpolationf\n.type linearInterpolationf, %function\nlinearInterpolationf:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global linearInterpolationf\n.type linearInterpolationf, %function\nlinearInterpolationf:\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
#include <math.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "51.6629581332" ], "var": [ "p" ] }, { "value": [ "52.6475994795" ], "var": [ "p" ] }, { "value": [ "39.6790641511" ], "var": [ "p" ] }, { "value": [ "55.9866344451" ], "var": [ "p" ] }, { "value": [ "70.5216234995" ], "var": [ "p" ] }, { "value": [ "13.7798470503" ], "var": [ "p" ] }, { "value": [ "76.9794791029" ], "var": [ "p" ] }, { "value": [ "59.5436538469" ], "var": [ "p" ] }, { "value": [ "80.3355455886" ], "var": [ "p" ] }, { "value": [ "79.8932457111" ], "var": [ "p" ] } ], "output": [ { "value": [ "51.66295623779297" ], "var": [ "returnv" ] }, { "value": [ "52.64759826660156" ], "var": [ "returnv" ] }, { "value": [ "39.6790657043457" ], "var": [ "returnv" ] }, { "value": [ "55.98663330078125" ], "var": [ "returnv" ] }, { "value": [ "70.52162170410156" ], "var": [ "returnv" ] }, { "value": [ "13.779847145080566" ], "var": [ "returnv" ] }, { "value": [ "76.97947692871094" ], "var": [ "returnv" ] }, { "value": [ "59.54365539550781" ], "var": [ "returnv" ] }, { "value": [ "80.3355484008789" ], "var": [ "returnv" ] }, { "value": [ "79.89324951171875" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_629fnb75vi.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_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 p, 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 p = input_json["p"]; clock_t begin = clock(); float returnv = linearInterpolationf(p); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(p, returnv); }
master
null
{"livein": ["p"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "linearInterpolationf", "funargs": ["p"], "typemap": {"p": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_629fnb75vi.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Lydux/gcc-4.6.2-human68k/build_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gcc-linaro-4.6-2012.12/gcc/testsuite/gcc.target/arm/mla-1.c
int foo (int *p, int *q) { int i; int accum = 0; for (i = 0 ; i < 1024; i++) { accum += ((*p--) * (*q++)); accum += 4096; accum >>= 13 ; } return accum; }
int foo(int *p, int *q)
int foo (int *p, int *q)
foo
[ "int", "int *", "int *" ]
{ "code": [ ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovq\t%rsi, -32(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tmovl\t$0, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovq\t-24(%rbp), %rax\n\tleaq\t-4(%rax), %rdx\n\tmovq\t%rdx, -24(%rbp)\n\tmovl\t(%rax), %ecx\n\tmovq\t-32(%rbp), %rax\n\tleaq\t4(%rax), %rdx\n\tmovq\t%rdx, -32(%rbp)\n\tmovl\t(%rax), %eax\n\timull\t%ecx, %eax\n\taddl\t%eax, -4(%rbp)\n\taddl\t$4096, -4(%rbp)\n\tsarl\t$13, -4(%rbp)\n\taddl\t$1, -8(%rbp)\n.L2:\n\tcmpl\t$1023, -8(%rbp)\n\tjle\t.L3\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%edx, %edx\n\txorl\t%eax, %eax\n.L2:\n\tmovq\t%rdx, %rcx\n\tnegq\t%rcx\n\tmovl\t(%rsi,%rcx), %ecx\n\timull\t(%rdi,%rdx), %ecx\n\tsubq\t$4, %rdx\n\tleal\t4096(%rax,%rcx), %eax\n\tsarl\t$13, %eax\n\tcmpq\t$-4096, %rdx\n\tjne\t.L2\n\tret\n\t.cfi_endproc\n\n", ".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t-4096(%rdi), %rcx\n\txorl\t%eax, %eax\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\taddq\t$4, %rsi\n\tmovl\t(%rdi), %edx\n\tsubq\t$4, %rdi\n\timull\t-4(%rsi), %edx\n\tleal\t4096(%rax,%rdx), %eax\n\tsarl\t$13, %eax\n\tcmpq\t%rcx, %rdi\n\tjne\t.L2\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tstr\twzr, [sp, 28]\n\tstr\twzr, [sp, 24]\n\tb\t.L2\n.L3:\n\tldr\tx0, [sp, 8]\n\tsub\tx1, x0, #4\n\tstr\tx1, [sp, 8]\n\tldr\tw1, [x0]\n\tldr\tx0, [sp]\n\tadd\tx2, x0, 4\n\tstr\tx2, [sp]\n\tldr\tw0, [x0]\n\tmul\tw0, w1, w0\n\tldr\tw1, [sp, 28]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 4096\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tasr\tw0, w0, 13\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 24]\n.L2:\n\tldr\tw0, [sp, 24]\n\tcmp\tw0, 1023\n\tble\t.L3\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx4, x0\n\tmov\tx2, 0\n\tmov\tw0, 0\n.L2:\n\tneg\tx3, x2\n\tldr\tw5, [x4, x2]\n\tsub\tx2, x2, #4\n\tcmn\tx2, #4096\n\tldr\tw3, [x1, x3]\n\tmadd\tw3, w3, w5, w0\n\tadd\tw3, w3, 4096\n\tasr\tw0, w3, 13\n\tbne\t.L2\n\tret\n\t.cfi_endproc\n\n", ".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx3, x0\n\tsub\tx5, x0, #4096\n\tmov\tw0, 0\n\t.p2align 3,,7\n.L2:\n\tldr\tw2, [x3], -4\n\tldr\tw4, [x1], 4\n\tcmp\tx3, x5\n\tmadd\tw2, w2, w4, w0\n\tadd\tw2, w2, 4096\n\tasr\tw0, w2, 13\n\tbne\t.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": [ "[30, 71, 96, 121, 41, 118, 114, 23, 63, 95, 89, 97, 106, 82, 87, 78, 36, 2, 45, 100, 64, 100, 24, 61, 115, 115, 120, 92, 103, 115, 6, 28]", "[78, 54, 53, 118, 71, 73, 81, 57, 2, 14, 0, 81, 123, 98, 109, 52, 115, 34, 42, 63, 14, 98, 109, 35, 63, 91, 99, 10, 101, 114, 39, 30]" ], "var": [ "p", "q" ] }, { "value": [ "[123, 40, 77, 42, 97, 23, 12, 45, 7, 73, 31, 18, 116, 115, 38, 97, 62, 49, 125, 41, 104, 73, 24, 51, 48, 23, 68, 119, 88, 126, 72, 86]", "[24, 29, 4, 79, 109, 44, 85, 8, 62, 34, 122, 81, 89, 107, 119, 84, 5, 13, 104, 35, 50, 67, 49, 38, 72, 11, 11, 71, 22, 61, 126, 13]" ], "var": [ "p", "q" ] }, { "value": [ "[79, 28, 59, 86, 68, 110, 60, 81, 8, 18, 103, 43, 61, 120, 67, 17, 22, 64, 123, 47, 7, 44, 117, 39, 85, 24, 80, 29, 0, 27, 100, 101]", "[37, 11, 112, 72, 70, 61, 78, 87, 112, 5, 77, 45, 74, 71, 83, 40, 117, 40, 42, 16, 102, 44, 29, 37, 29, 123, 115, 67, 14, 36, 54, 34]" ], "var": [ "p", "q" ] }, { "value": [ "[9, 58, 23, 117, 54, 113, 119, 105, 92, 0, 43, 120, 74, 102, 26, 35, 77, 20, 67, 91, 58, 76, 110, 71, 38, 94, 26, 60, 67, 54, 42, 71]", "[17, 67, 114, 88, 16, 76, 100, 6, 10, 7, 78, 10, 115, 103, 124, 1, 81, 81, 47, 54, 108, 76, 118, 56, 20, 35, 45, 2, 8, 44, 49, 108]" ], "var": [ "p", "q" ] }, { "value": [ "[95, 102, 116, 32, 110, 103, 102, 118, 10, 67, 116, 74, 59, 35, 48, 90, 44, 16, 79, 52, 99, 38, 0, 34, 7, 65, 75, 121, 125, 11, 38, 125]", "[11, 95, 98, 75, 55, 41, 60, 18, 57, 87, 41, 122, 17, 29, 92, 115, 36, 6, 72, 99, 79, 41, 53, 105, 53, 62, 3, 95, 5, 17, 119, 41]" ], "var": [ "p", "q" ] }, { "value": [ "[122, 50, 86, 75, 20, 125, 9, 40, 114, 108, 1, 23, 75, 11, 33, 93, 94, 90, 71, 43, 93, 93, 80, 111, 124, 44, 56, 102, 116, 8, 59, 8]", "[62, 112, 115, 76, 99, 77, 93, 11, 25, 33, 119, 76, 119, 78, 81, 68, 116, 116, 109, 104, 80, 98, 99, 112, 89, 35, 54, 6, 6, 59, 46, 42]" ], "var": [ "p", "q" ] }, { "value": [ "[29, 28, 80, 64, 16, 116, 59, 84, 28, 26, 32, 78, 106, 18, 22, 72, 48, 99, 91, 102, 94, 89, 45, 111, 59, 89, 61, 105, 54, 12, 45, 108]", "[110, 117, 9, 111, 119, 116, 97, 72, 121, 14, 26, 23, 63, 98, 88, 47, 36, 21, 34, 96, 12, 95, 60, 113, 114, 4, 37, 64, 126, 113, 40, 124]" ], "var": [ "p", "q" ] }, { "value": [ "[123, 76, 34, 31, 122, 59, 27, 59, 93, 32, 99, 48, 6, 23, 51, 73, 11, 55, 119, 99, 123, 94, 71, 110, 24, 69, 26, 21, 56, 86, 16, 6]", "[86, 126, 79, 27, 84, 7, 54, 107, 73, 85, 20, 57, 84, 17, 66, 24, 52, 98, 90, 75, 55, 25, 68, 24, 11, 67, 40, 68, 19, 59, 73, 63]" ], "var": [ "p", "q" ] }, { "value": [ "[74, 26, 62, 35, 100, 115, 118, 32, 4, 95, 81, 4, 96, 39, 58, 107, 60, 69, 89, 59, 121, 95, 46, 56, 47, 109, 75, 62, 38, 93, 5, 71]", "[107, 10, 5, 25, 67, 64, 118, 50, 1, 0, 94, 35, 36, 29, 102, 114, 19, 29, 100, 82, 57, 64, 93, 122, 7, 23, 89, 2, 88, 108, 94, 86]" ], "var": [ "p", "q" ] }, { "value": [ "[105, 50, 74, 82, 51, 109, 85, 126, 81, 124, 116, 48, 76, 19, 33, 44, 20, 61, 26, 118, 58, 11, 111, 82, 33, 12, 27, 3, 119, 110, 4, 45]", "[101, 71, 46, 17, 79, 80, 81, 87, 23, 76, 69, 98, 74, 84, 70, 99, 65, 35, 58, 84, 74, 111, 88, 122, 72, 99, 67, 45, 96, 90, 17, 45]" ], "var": [ "p", "q" ] } ], "output": [ { "value": [ "[30, 71, 96, 121, 41, 118, 114, 23, 63, 95, 89, 97, 106, 82, 87, 78, 36, 2, 45, 100, 64, 100, 24, 61, 115, 115, 120, 92, 103, 115, 6, 28]", "[78, 54, 53, 118, 71, 73, 81, 57, 2, 14, 0, 81, 123, 98, 109, 52, 115, 34, 42, 63, 14, 98, 109, 35, 63, 91, 99, 10, 101, 114, 39, 30]", "0" ], "var": [ "p", "q", "returnv" ] }, { "value": [ "[123, 40, 77, 42, 97, 23, 12, 45, 7, 73, 31, 18, 116, 115, 38, 97, 62, 49, 125, 41, 104, 73, 24, 51, 48, 23, 68, 119, 88, 126, 72, 86]", "[24, 29, 4, 79, 109, 44, 85, 8, 62, 34, 122, 81, 89, 107, 119, 84, 5, 13, 104, 35, 50, 67, 49, 38, 72, 11, 11, 71, 22, 61, 126, 13]", "0" ], "var": [ "p", "q", "returnv" ] }, { "value": [ "[79, 28, 59, 86, 68, 110, 60, 81, 8, 18, 103, 43, 61, 120, 67, 17, 22, 64, 123, 47, 7, 44, 117, 39, 85, 24, 80, 29, 0, 27, 100, 101]", "[37, 11, 112, 72, 70, 61, 78, 87, 112, 5, 77, 45, 74, 71, 83, 40, 117, 40, 42, 16, 102, 44, 29, 37, 29, 123, 115, 67, 14, 36, 54, 34]", "0" ], "var": [ "p", "q", "returnv" ] }, { "value": [ "[9, 58, 23, 117, 54, 113, 119, 105, 92, 0, 43, 120, 74, 102, 26, 35, 77, 20, 67, 91, 58, 76, 110, 71, 38, 94, 26, 60, 67, 54, 42, 71]", "[17, 67, 114, 88, 16, 76, 100, 6, 10, 7, 78, 10, 115, 103, 124, 1, 81, 81, 47, 54, 108, 76, 118, 56, 20, 35, 45, 2, 8, 44, 49, 108]", "0" ], "var": [ "p", "q", "returnv" ] }, { "value": [ "[95, 102, 116, 32, 110, 103, 102, 118, 10, 67, 116, 74, 59, 35, 48, 90, 44, 16, 79, 52, 99, 38, 0, 34, 7, 65, 75, 121, 125, 11, 38, 125]", "[11, 95, 98, 75, 55, 41, 60, 18, 57, 87, 41, 122, 17, 29, 92, 115, 36, 6, 72, 99, 79, 41, 53, 105, 53, 62, 3, 95, 5, 17, 119, 41]", "0" ], "var": [ "p", "q", "returnv" ] }, { "value": [ "[122, 50, 86, 75, 20, 125, 9, 40, 114, 108, 1, 23, 75, 11, 33, 93, 94, 90, 71, 43, 93, 93, 80, 111, 124, 44, 56, 102, 116, 8, 59, 8]", "[62, 112, 115, 76, 99, 77, 93, 11, 25, 33, 119, 76, 119, 78, 81, 68, 116, 116, 109, 104, 80, 98, 99, 112, 89, 35, 54, 6, 6, 59, 46, 42]", "0" ], "var": [ "p", "q", "returnv" ] }, { "value": [ "[29, 28, 80, 64, 16, 116, 59, 84, 28, 26, 32, 78, 106, 18, 22, 72, 48, 99, 91, 102, 94, 89, 45, 111, 59, 89, 61, 105, 54, 12, 45, 108]", "[110, 117, 9, 111, 119, 116, 97, 72, 121, 14, 26, 23, 63, 98, 88, 47, 36, 21, 34, 96, 12, 95, 60, 113, 114, 4, 37, 64, 126, 113, 40, 124]", "0" ], "var": [ "p", "q", "returnv" ] }, { "value": [ "[123, 76, 34, 31, 122, 59, 27, 59, 93, 32, 99, 48, 6, 23, 51, 73, 11, 55, 119, 99, 123, 94, 71, 110, 24, 69, 26, 21, 56, 86, 16, 6]", "[86, 126, 79, 27, 84, 7, 54, 107, 73, 85, 20, 57, 84, 17, 66, 24, 52, 98, 90, 75, 55, 25, 68, 24, 11, 67, 40, 68, 19, 59, 73, 63]", "0" ], "var": [ "p", "q", "returnv" ] }, { "value": [ "[74, 26, 62, 35, 100, 115, 118, 32, 4, 95, 81, 4, 96, 39, 58, 107, 60, 69, 89, 59, 121, 95, 46, 56, 47, 109, 75, 62, 38, 93, 5, 71]", "[107, 10, 5, 25, 67, 64, 118, 50, 1, 0, 94, 35, 36, 29, 102, 114, 19, 29, 100, 82, 57, 64, 93, 122, 7, 23, 89, 2, 88, 108, 94, 86]", "0" ], "var": [ "p", "q", "returnv" ] }, { "value": [ "[105, 50, 74, 82, 51, 109, 85, 126, 81, 124, 116, 48, 76, 19, 33, 44, 20, 61, 26, 118, 58, 11, 111, 82, 33, 12, 27, 3, 119, 110, 4, 45]", "[101, 71, 46, 17, 79, 80, 81, 87, 23, 76, 69, 98, 74, 84, 70, 99, 65, 35, 58, 84, 74, 111, 88, 122, 72, 99, 67, 45, 96, 90, 17, 45]", "0" ], "var": [ "p", "q", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_58xqf48mp6.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int* p, int* q, int returnv) { json output_json; std::vector<json> output_temp_3; for (unsigned int i4 = 0; i4 < 32; i4++) { int output_temp_5 = p[i4]; output_temp_3.push_back(output_temp_5); } output_json["p"] = output_temp_3; std::vector<json> output_temp_6; for (unsigned int i7 = 0; i7 < 32; i7++) { int output_temp_8 = q[i7]; output_temp_6.push_back(output_temp_8); } output_json["q"] = output_temp_6; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["p"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* p = &input_temp_1_vec[0]; std::vector<int> input_temp_2_vec; for (auto& elem : input_json["q"]) { int input_temp_2_inner = elem; input_temp_2_vec.push_back(input_temp_2_inner); } int* q = &input_temp_2_vec[0]; clock_t begin = clock(); int returnv = foo(p, q); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(p, q, returnv); }
ar9344
null
{"livein": ["p", "q"], "liveout": ["p", "q"], "returnvarname": ["returnv"], "execcmd": "", "funname": "foo", "funargs": ["p", "q"], "typemap": {"p": "array(int32#32)", "q": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_58xqf48mp6.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}