data_source
stringclasses
1 value
prompt
listlengths
1
1
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint n,i,p,c,ans=0;\nint a[100000],x[100000],y[100000];\n\nint main(){\n scanf(\"%d\",&n);\n for(i=0;i<n;i++){\n scanf(\"%d\",&a[i]);\n x[i]=-1;...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n\nint main(){\n char s[11]; scanf(\"%s\", s);\n int flag = 1;\n if(s[0] != 'A'){\n flag = 0;\n }else{\n int ccount = 0...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"WA\"\n.LC2:\n\t.string\t\"AC\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startpr...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"WA\"\n.LC2:\n\t.string\t\"AC\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n\tchar s[100];\n\tscanf(\"%s\",s);\n\ts[5] = ' ';\n\ts[13] = ' ';\n\t\n\tprintf(\"%s\\n\",s);\n\n \treturn 0;\n}```\n\nAssembly...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n long n;\n long a[200001];\n long b[200001] = {0};\n long i, j, cnt = 0, idx = 1, m = 0;\n \n scanf(\"%ld\", &n);\n for (i...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%ld\"\n.LC1:\n\t.string\t\"%ld\\n\"\n.LC2:\n\t.string\t\"%ld \"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%ld\"\n.LC1:\n\t.string\t\"%ld\\n\"\n.LC2:\n\t.string\t\"%ld \"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startp...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nmain(){\n long nk[40]={1,};\n int i;\n int n;\n\n for(i=0;i<30;i++){\n nk[i+1]+=nk[i];\n nk[i+2]+=nk[i];\n nk[i+3]+...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC16:\n\t.string\t\"%ld\\n\"\n.LC17:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpus...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC16:\n\t.string\t\"%ld\\n\"\n.LC17:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n\nint main(){\n\n char s[128];\n \n scanf(\"%s\", s); \n \n if((strcmp(s,\"hi\")==0)||(strcmp(s,\"hihi\")==0)||(strcmp(s,\"hi...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"hi\"\n.LC2:\n\t.string\t\"hihi\"\n.LC3:\n\t.string\t\"hihihi\"\n.LC4:\n\t.string\t\"hihihihi\"\n.LC5:\n\t.string\t\"hihihihihi\"\n.LC6:\n\t.string\t\"Yes\"\n.LC7:...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"hi\"\n.LC2:\n\t.string\t\"hihi\"\n.LC3:\n\t.string\t\"hihihi\"\n.LC4:\n\t.string\t\"hihihihi\"\n.LC5:\n\t.string\t\"hihihihihi\"\n.LC6:\n\t.string\t\"Yes\"\n.LC7:\n\t.s...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int n;\n int a[1000];\n int max=0;\n int min=9999;\n scanf(\"%d\",&n);\n for(int i=0;i<n;i++){\n scanf(\"%d\",&a...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nmain(n,k){scanf(\"%d%d\",&n,&k)<printf(\"%d\",~-~-n/~-k+1);}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbi...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$2...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rs...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(){\n\tchar S[100000];\n\tscanf(\"%s\",S);\n\tint i,frag = 0;\n\tfor(i = 0; S[i] != '\\0'; i++){\n\t\tif(S[i] == 'd' && S[i + 1] == 'r' && S[...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"YES\"\n.LC2:\n\t.string\t\"NO\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startp...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"YES\"\n.LC2:\n\t.string\t\"NO\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int n;\n scanf(\"%d\",&n);\n int a[n];\n int i;\n for(i=0;i<n;i++){\n scanf(\"%d\",&a[i]);\n }\n int ans=0;\n int count[100001...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nstruct P{\n\tfloat t;\n\tint z;\n}n[24],m[18];\nM(float*a,float*b){\n\treturn*a>*b?1:-1;\n}\nD(struct P*p){\n\tprintf(\"%d %.2f\\n\",p->z,p->t);\n}\nmain(i){\n\tfor(i=0;i...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tM\n\t.type\tM, @function\nM:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovss\t(%rdi), %xmm0\n\txorl\t%eax, %eax\n\tcomiss\t(%rsi), %xmm0\n\tseta\t%al\n\tleal\t-1(%rax,%rax), %eax\n\tret\n\t.cfi_endproc\n.LFE0:\n\t.size\tM, .-M\n\t.sec...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tM\n\t.type\tM, @function\nM:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovss\t(%rdi), %xmm0\n\txorl\t%eax, %eax\n\tcomiss\t(%rsi), %xmm0\n\tseta\t%al\n\tleal\t-1(%rax,%rax), %eax\n\tret\n\t.cfi_endproc\n.LFE0:\n\t.size\tM, .-M\n\t.section\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n\tint price;\n\tint i;\n\t\n\twhile (scanf(\"%d\", &price), price != 0){\n\t\tfor (i = 0; i < 9; i++){\n\t\t\tint money;\n\t\t\t\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r14\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(void){\n int n, c, i, sm=0;\n scanf(\"%d %d\", &n, &c);\n for(i=0; i<c; i++){\n int tmp;\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_s...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startpr...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n long n,i,max,result=0,a[200000];\n\n scanf(\"%ld\",&n);\n for(i=0;i<n;i++){\n scanf(\"%ld\",&a[i]);\n }\n \n max=a[0];\n for...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%ld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\n\t.cfi_def_cfa_offset...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%ld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 16\n\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint go[100000];\n\nint main(void)\n{\n\tint n;\n\t\n\twhile (scanf(\"%d\", &n), n != 0){\n\t\tint i, j;\n\t\tint cnt;\n\t\t\n\t\tfor (i = 0; i < n; ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nlong a;main(d,c){for(gets(&d);~scanf(\"%d%s%d\",&d,&c,&d);puts(a?\"No\":\"Yes\"))a+=c&1?d:-d;exit(0);}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"No\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"%d%s%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_sta...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"No\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"%d%s%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <math.h>\n\nint main(void){\n int x,n,m,y;\n scanf(\"%d %d\",&n,&m);\n y=(int) (1900*m+100*(n-m))*pow(2,m);\n printf(\"%d\",y);\n\n retu...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC2:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC2:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40, %...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(){\n long long n,p,f[99],a[99],ans=1,c,i,x=0;\n scanf(\"%lld%lld\",&n,&p);\n for(i=2;i*i<=p;i++){c=0;while(p%i==0){p/=i;c++;}if(c){f[x]=i;...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld%lld\"\n.LC1:\n\t.string\t\"%lld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tp...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld%lld\"\n.LC1:\n\t.string\t\"%lld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main () {\n char S[5];\n scanf(\"%s\", S);\n\n if ((S[0] == S[1] && S[2] == S[3] && S[0] != S[2]) ||\n (S[0] == S[2] && S[1] == ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startp...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(void)\n{\n int i,j,x,xx,y,yy,s,S,S1;\n\n while(1)\n {\n scanf(\"%d%d%d\",&x,&y,&s);\n if(x==0 && y==0 && s==0) break;\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpu...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void){\n int x,y;\n scanf(\"%d%d\",&x,&y);\n printf(\"%d\",x%y?x:-1);\n return 0;\n}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp....
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %r...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nn,i,a[100009];main(){\n\tscanf(\"%d\",&n);for(i=0;i<n;i++)scanf(\"%d\",&a[i]);\n\tfor(i=n-1;i>=1;i--){\n \tif(a[i]<a[i-1])a[i-1]--;\n \tif(a[i]<a[i-1]){printf(\"No\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"No\"\n.LC2:\n\t.string\t\"Yes\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startpr...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"No\"\n.LC2:\n\t.string\t\"Yes\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n #include<stdio.h>\n int main(void)\n {\n int N,i=1;\n int a,b,c,S;\n\n scanf(\"%d\",&N);\n\n a=N/100;\n b=(N%100)/10;\n c=(N%100)%10;\n\n if(...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nmain(s,w){scanf(\"%d%d\",&s,&w);puts(s>w?\"safe\":\"unsafe\");}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@pro...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"safe\"\n.LC1:\n\t.string\t\"unsafe\"\n.LC2:\n\t.string\t\"%d%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"safe\"\n.LC1:\n\t.string\t\"unsafe\"\n.LC2:\n\t.string\t\"%d%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startp...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void)\n{\n int X,A;\n scanf(\"%d %d\",&X,&A);\n if(X < A){\n printf(\"%d\",0);\n }else{\n printf(\"%d\",10);\n }...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\nint a,b,p;\nscanf(\"%d %d\",&a,&b);\np=(a+b);\nif(a%3==0)\n{\n printf(\"Possible\\n\");\n}\nelse if(b%3==0)\n{\n printf(\"Possible\\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"Possible\"\n.LC2:\n\t.string\t\"Impossible\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"Possible\"\n.LC2:\n\t.string\t\"Impossible\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t....
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n \nchar next_char(char c, int n) {\n for (int i = 0; i < n; i++) {\n if (c == 'z') { c = 'a'; }\n else { c += 1; }\n }\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tnext_char\n\t.type\tnext_char, @function\nnext_char:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\ttestl\t%esi, %esi\n\tjle\t.L6\n\txorl\t%edx, %edx\n.L4:\n\tcmpb\t$122, %al\n\tjne\t.L5\n\tleal\t1(%rdx), %eax\n\tcmpl\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tnext_char\n\t.type\tnext_char, @function\nnext_char:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\ttestl\t%esi, %esi\n\tjle\t.L6\n\txorl\t%edx, %edx\n.L4:\n\tcmpb\t$122, %al\n\tjne\t.L5\n\tleal\t1(%rdx), %eax\n\tcmpl\t%eax,...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main (void)\n{\n int n;\n scanf(\"%d\",&n);\n if(n<1000)\n {\n puts(\"ABC\");\n }else{\n puts(\"ABD\");\n }\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"ABC\"\n.LC2:\n\t.string\t\"ABD\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_start...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"ABC\"\n.LC2:\n\t.string\t\"ABD\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void){\n\n long int a,b,c,d,n;\n int judge = 0;\n char s[200000];\n \n scanf(\"%ld%ld%ld%ld%ld\",&n,&a,&b,&c...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%ld%ld%ld%ld%ld\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"Yes\"\n.LC3:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%ld%ld%ld%ld%ld\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"Yes\"\n.LC3:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @functi...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(void){\n int n;\n scanf(\"%d\",&n);\n \n int rate[101];\n int count[8] = {0} , max = 0;\n for(int i = 0;i < n;i ++){\n scanf(\"%d\"...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"1 %d\"\n.LC3:\n\t.string\t\"%d %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"1 %d\"\n.LC3:\n\t.string\t\"%d %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_start...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(){\n char s[9];\n int i,c=0;\n scanf(\"%s\",s);\n for(i=0;i<3;i++){\n if(s[i]=='1'){\n c+=1;\n }\n }\n printf...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40, %...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void){\n int A,B,T;\n scanf(\"%d %d %d\",&A,&B,&T);\n int s;\n s=B*(T/A);\n printf(\"%d\",s);\n return 0;\n}```\n\nAssembly Code:\n\n``...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int a,p;\n scanf(\"%d%d\",&a,&p);\n printf(\"%d\",(3*a+p)/2);\n}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %r...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int n;\n scanf(\"%d\",&n);\n int a[n + 1];\n for(int i = 1; i <= n; i++)\n scanf(\"%d\",&a[i]);\n int ans = 0;\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include <string.h>\n\nint main(void)\n{\n\tint n,k;\n\tint i = 0;\n\tint j = 0;\n\tint *table, *value;\n\tint...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\n\t.cfi_def_cfa_offset ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\n\t.cfi_def_cfa_offset 16\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void)\n{\n int A,B;\n int i,j=0,S=0;\n \n scanf(\"%d%d\",&A,&B);\n \n if(B==1) printf(\"0\\n\");\n else{\n for(i=1;i<=50...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"0\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_sta...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"0\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(void) {\n\tlong long int n, k,a,b;\n\n\tscanf(\"%lld %lld\", &n, &k);\n\n\ta = n % k;\n\tb = a - k;\n\n\tif (b < 0) {\n\t\tb *= -1;\n\t}\n\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld %lld\"\n.LC1:\n\t.string\t\"%lld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld %lld\"\n.LC1:\n\t.string\t\"%lld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<string.h>\n\nint main() {\n\tchar s[103], p[102];\n\tint l, i, b = 0, j, k;\n\tfgets(s, 121, stdin);\n\tl = strlen(s) - 1;\n\tfgets(p, l, stdi...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"Yes\"\n.LC1:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"Yes\"\n.LC1:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\n\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n int a,b,c,i,n,k[10000];\n while(scanf(\"%d\",&n),n!=0){\n for(a=b=c=i=0;i<n;i++){\n scanf(\"%d\",&k[i]);\n if(k[i]>1){ ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"NA\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"NA\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<stdlib.h>\n#include<math.h>\n\ntypedef long long int int64;\n\n#define MAX(a,b) ((a)>(b)?(a):(b))\n#define MIN(a,b) ((a)<(b)?(a):(b))\n#define...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"20 %d\\n\"\n.LC2:\n\t.string\t\"%d %d %d\\n\"\n\t.text\n\t.p2align 4\n\t.globl\trun\n\t.type\trun, @function\nrun:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"20 %d\\n\"\n.LC2:\n\t.string\t\"%d %d %d\\n\"\n\t.text\n\t.p2align 4\n\t.globl\trun\n\t.type\trun, @function\nrun:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void)\n{\n\tint n,a[1000],i,t,min,s;\n\t\n\twhile(scanf(\"%d\",&n))\n\t{\n\t\tif(n==0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tfor(i=0;i<n;i++)...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\ntypedef long long LL;\n\nint main()\n{\t \n\tlong long a, c, b;\n\tchar s[5];\n\t\n\tscanf(\"%lld%s\", &a, s);\n\tb = (LL)(s[0] - 48) * 100 + (LL)(s[2...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld%s\"\n.LC1:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld%s\"\n.LC1:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n#define int long long\nmain()\n{\n int N = 0;\n scanf(\"%lld\",&N);\n\n int A[N];\n int i = 0;\n for(i = 0; i < N ; i++)\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n.LC1:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpu...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n.LC1:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void){\n\tint s,b,copy;\n\tint i,j;\n\tint a[200];\n\tscanf(\"%d%d\",&s,&b);\n\tfor(i=0;i<s;i++){\n\t\tscanf(\"%d\",&a[i]);\n\t}\n\tfor(i=1;i<...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_st...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startpro...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include <limits.h>\n#include <string.h>\nint main()\n{\n char S[4];\n scanf(\"%s\",S);\n char str[2]={'...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"YYMM\"\n.LC2:\n\t.string\t\"MMYY\"\n.LC3:\n\t.string\t\"AMBIGUOUS\"\n.LC4:\n\t.string\t\"NA\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"YYMM\"\n.LC2:\n\t.string\t\"MMYY\"\n.LC3:\n\t.string\t\"AMBIGUOUS\"\n.LC4:\n\t.string\t\"NA\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void) {\n int turu = 2;\n int tart = 4;\n int x, y;\n int judge = 0;\n scanf(\"%d%d\", &x, &y);\n for(int i = 1; i <= x; i++) {\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d%d\"\n.LC4:\n\t.string\t\"Yes\"\n.LC5:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d%d\"\n.LC4:\n\t.string\t\"Yes\"\n.LC5:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\n int gcd(int a,int b){\n while(b!=0){\n int r = a%b;\n a = b;\n b = r;\n }\n return a;\n }\n \n\nint main (){\n int K;\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %edx\n\ttestl\t%esi, %esi\n\tje\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t%edx, %r8d\n\tcltd\n\tidivl\t%r8d\n\tmov...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %edx\n\ttestl\t%esi, %esi\n\tje\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t%edx, %r8d\n\tcltd\n\tidivl\t%r8d\n\tmovl\t%r8...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint gcd(int x,int y)\n{\n\tint r;\n\tif(y>x){\n\t\tr=x;\n\t\tx=y;\n\t\ty=r;\n\t}\n\twhile(y>0){\n\t\tr=x%y;\n\t\tx=y;\n\t\ty=r;\n\t}\n\treturn x;\n}...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %edx\n\tcmpl\t%edi, %esi\n\tjle\t.L2\n\tmovl\t%esi, %eax\n\tmovl\t%edi, %edx\n.L2:\n\ttestl\t%edx, %edx\n\tjle\t.L5\n\t.p2al...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %edx\n\tcmpl\t%edi, %esi\n\tjle\t.L2\n\tmovl\t%esi, %eax\n\tmovl\t%edi, %edx\n.L2:\n\ttestl\t%edx, %edx\n\tjle\t.L5\n\t.p2align 4,...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main()\n{\n\tint x,y;\n\tint box1,box2;\n\tint amari=0;\n\tint ans;\n\n\n\tscanf(\"%d\",&x);\n\tscanf(\"%d\",&y);\n\n\tif(x<=y)\n\t{\n\t\tbox1=x;...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\n int A,B,X,Y;\n scanf(\"%d %d %d\",&X,&A,&B);\n Y=(X-A)%B;\n printf(\"%d\",Y);\n return 0;\n \n}```\n\nAssembly Code:\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void)\n{\n\tint a,q,e,w;\n\tscanf(\"%d %d\",&a,&q);\n\te=0; w=0;\n\tw=a+q;\n\te=w/2;\n\tprintf(\"%d\\n\",e);\n\treturn 0;\n}\n```\n\nAssembly ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n char b[2];\n scanf(\"%s\",b);\n if(b[0] == 'A')\n puts(\"T\");\n else if(b[0] == 'C')\n puts(\"G\");\n else ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"T\"\n.LC2:\n\t.string\t\"G\"\n.LC3:\n\t.string\t\"C\"\n.LC4:\n\t.string\t\"A\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"T\"\n.LC2:\n\t.string\t\"G\"\n.LC3:\n\t.string\t\"C\"\n.LC4:\n\t.string\t\"A\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain,...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n #include <stdio.h>\n\nint main()\n{\n int a, p, x;\n\n scanf(\"%d %d\", &a, &p);\n x = (a*3 + p) / 2;\n\n printf(\"%d\\n\", x);\n \nreturn 0;\n}```\n\nAssembly Cod...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\nint main() {\n\n\tint i, ans = 0, x, y;\n\tchar s[1000], t[1000];\n\tchar end[] = \"END_OF_TEXT\";\n\n\tscanf(\"%s\", s);\n\tfor ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r14\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nn;main(m){scanf(\"%d%d\",&n,&m);printf(\"%d00\",n+18*m<<m);}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbi...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d00\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d00\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void)\n{\n int D,T,S;\n scanf(\"%d %d %d\",&D,&T,&S);\n if(T*S >= D){\n printf(\"Yes\");\n }else{\n printf(\"No\");...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startp...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\tint main(){\n\t\tint n,i,g,a,b,c;\n\t\tdouble h,max,e;\n\t\twhile(scanf(\"%d\",&n),n){\n\t\t\tmax=10000000;\n\t\t\tfor(i=0;i<n;i++){\n\t\t\t\tscanf(\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d %d %d\"\n.LC4:\n\t.string\t\"%d\\n\"\n.LC5:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cf...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d %d %d\"\n.LC4:\n\t.string\t\"%d\\n\"\n.LC5:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void){\nint W,H,N,i,x,y,x2,y2,xx,yy,a=0;\nscanf(\"%d%d%d\",&W,&H,&N);\nfor(i=0;i<N;i++){\nscanf(\"%d%d\",&x,&y);\nif(i!=0){\nxx=x-x2;\nyy=y-y2...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"%d%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cf...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"%d%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void) {\n\tint p,m,c;\n\tscanf(\"%d %d %d\",&p,&m,&c);\n\tprintf(\"%d\\n\",p+m+c);\n\treturn 0;\n}\n```\n\nAssembly Code:\n\n```assembly\n\t....
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\n unsigned long long int n,i,j,min,a[10];\n scanf(\"%llu\",&n);\n scanf(\"%llu\",&a[0]);\n min=a[0];\n for(i=2;i<=5;i++)\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%llu\"\n.LC1:\n\t.string\t\"%llu\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpu...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%llu\"\n.LC1:\n\t.string\t\"%llu\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\nint n,l,d,count=0;\nscanf(\"%d %d %d\",&n,&l,&d);\nint i;\nfor(i=n;i<=l;i++)\n{\n\tif(i%d==0)\n\tcount++;\n\n}\nprintf(\"%d\\n\",count);...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nb;main(a){for(;read(0,&b,2),b%8;)a++;printf(\"%d\",a);}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 1...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t....
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\n#define WIDTH 64\n#define HEIGHT 64\n\nint main(void) {\n\tint A, B;\n\tchar grid[128][128];\n\tint i, j, k;\n\tif (scanf(\"%d%d\", &A, &B) != 2) re...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d %d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tp...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d %d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n# include\"stdio.h\"\nint main(){\n int n;\n scanf(\"%d\",&n);\n char s[n];\n int f[n];\n scanf(\"%s\",s);\n\n for(int i=0;i<n;i++)\n f[i]=0;\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\n int a,b;\n scanf(\"%d %d\",&a,&b);\n if(b%a==0)\n printf(\"%d\\n\",a+b);\n else\n printf(\"%d\\n\",b-a);\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main()\n{\n int x;\n scanf(\"%d\",&x);\n\n //printf(\"%d %d \",(x + 99) / 100 * 100,(x + 104) / 105 * 105);\n if((x / 100) * 100 <= ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp\n\t.cfi_def_cfa_off...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp\n\t.cfi_def_cfa_offset 32...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void){\nchar a[5];\n scanf(\"%s\",a);\n if(a[1]=='B'){a[1]='R';}\n else{a[1]='B';}\n puts(a);\n return 0;\n}\n ```\n\nAssembly Code:\n\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include \"stdio.h\"\n\nvoid main(void){\n long H,W;\n scanf(\"%ld %ld\",&H,&W);\n if(H==1||W==1){\n printf(\"1\\n\");\n }\n else if(H*W%2){\n printf(\"%ld\\n\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%ld %ld\"\n.LC1:\n\t.string\t\"1\"\n.LC2:\n\t.string\t\"%ld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%ld %ld\"\n.LC1:\n\t.string\t\"1\"\n.LC2:\n\t.string\t\"%ld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_start...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n\tint a,b,c=0,d,i;\n\twhile(1){\n\t\tc=0;\n\tscanf(\"%d\",&a);\n\t\tif(a==0){\n\t\t\treturn 0;\n\t\t}\n\tfor(i=0;i<9;i++){\n\t\tscanf(\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int n,m,s,i,j,t,d[101];\n while(scanf(\"%d\",&n)!=EOF){\n for(i=0;i<n;i++){\n scanf(\"%d\",&d[i]);\n for(j=i;j;j--){\n\tif...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void) {\n int H , W,i,j,k;\n\n while(1){\n scanf(\"%d %d\",&H,&W);\n if(H == 0 && W == 0) {\n break;\n }\n\t\tfor(i=0;i<W;i...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n char c[2][3];\n scanf(\"%s\",c[0]);\n scanf(\"%*c%s\",c[1]);\n if(c[0][0]==c[1][2] && c[0][1]==c[1][1] && c[0][2]==c[1][0])\n puts...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%*c%s\"\n.LC2:\n\t.string\t\"YES\"\n.LC3:\n\t.string\t\"NO\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\n...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%*c%s\"\n.LC2:\n\t.string\t\"YES\"\n.LC3:\n\t.string\t\"NO\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nL,R,i,c[555][555],s;main(n){for(scanf(\"%*d%d%*d\",&n);~scanf(\"%d%d\",&L,&R);i++)for(s=0;i/n?R/L||!printf(\"%d\\n\",s):R<501;)i/n?s+=c[L++][R]:c[L][R++]++;}```\n\nAssemb...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%*d%d%*d\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"%d%d\"\n\t.section\t.text.unlikely,\"ax\",@progbits\n.LCOLDB3:\n\t.section\t.text.startup,\"ax\",@progbits\n.LHOTB3:\n\t.p2alig...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%*d%d%*d\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"%d%d\"\n\t.section\t.text.unlikely,\"ax\",@progbits\n.LCOLDB3:\n\t.section\t.text.startup,\"ax\",@progbits\n.LHOTB3:\n\t.p2align 4\n\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n// AtCoder ABC070 C - Multiple Clocks\n// 2020.1.25 bal4u\n\n#include <stdio.h>\n\ntypedef long long ll;\n\nll gcd(ll a, ll b) {\n\tll r;\n\twhile (b != 0) r = a % b, a =...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tmovq\t%rsi, %rdx\n\ttestq\t%rsi, %rsi\n\tje\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovq\t%rdx, %r8\n\tcqto\n\tidivq\t%r8\n\tmovq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tmovq\t%rsi, %rdx\n\ttestq\t%rsi, %rsi\n\tje\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovq\t%rdx, %r8\n\tcqto\n\tidivq\t%r8\n\tmovq\t%r8, ...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <limits.h>\n#include <stdint.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n\n#define P 1000000007\n\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcomp\n\t.type\tcomp, @function\ncomp:\n.LFB63:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE63:\n\t.size\tcomp, .-comp\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcomp\n\t.type\tcomp, @function\ncomp:\n.LFB63:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE63:\n\t.size\tcomp, .-comp\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.stri...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nf(){int a=-1,b=-1,c;for(;(c=getchar())!='\\n';a++)b+=c-48;printf(\"%s wins.\\n\",(a+b/9)&1?\"Fabre\":\"Audrey\");}main(n){for(scanf(\"%d\",&n),getchar();n--;)f();exit(0);...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"Fabre\"\n.LC1:\n\t.string\t\"Audrey\"\n.LC2:\n\t.string\t\"%s wins.\\n\"\n\t.text\n\t.p2align 4\n\t.globl\tf\n\t.type\tf, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"Fabre\"\n.LC1:\n\t.string\t\"Audrey\"\n.LC2:\n\t.string\t\"%s wins.\\n\"\n\t.text\n\t.p2align 4\n\t.globl\tf\n\t.type\tf, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cf...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main ()\n{\n\tchar a;\n\tscanf(\"%c\",&a);\n\tprintf(\"%c\",a+1);\t\n\treturn 0 ;\n}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%c\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp\n\t.cfi_def_cfa_off...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%c\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp\n\t.cfi_def_cfa_offset 32...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n int R,G;\n scanf(\"%d\\n%d\",&R,&G);\n printf(\"%d\\n\",2*G-R);\n return 0;\n}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"tem...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\ts...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\nint x, y = 0, b = 0;\nscanf(\"%d\", &x);\nint n = x%2==0?x-(x/2-1):x-(x/2);\nfor(int i = 0; y < x; i++){\ny += i;\nif(y==x){\n\tprintf(...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n\nint main() {\n char S[10];\n scanf(\"%s\", S);\n if (!strcmp(S, \"Sunny\")) {\n printf(\"%s\\n\", \"Cloudy\")...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"Sunny\"\n.LC2:\n\t.string\t\"Cloudy\"\n.LC3:\n\t.string\t\"Rainy\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @func...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"Sunny\"\n.LC2:\n\t.string\t\"Cloudy\"\n.LC3:\n\t.string\t\"Rainy\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\n...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int n,a,b,c,d,e,f;\n scanf(\"%d %d %d %d %d\",&n,&a,&b,&c,&d);\n e=a/c;\n if(a%c)e++;\n f=b/d;\n if(b%d)f++;\n if(e<f)e=f;\n prin...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\nint main(void) {\n char S[100];\n scanf(\"%s\", S);\n int l = strlen(S);\n for (int i = 0; i < l; i++) {\n S[i] = 'x';\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nvoid call(int n);\nint cas, loop;\nint main(){\n\tint n;\n\tcas = 0;\n\tloop = 1;\n\tscanf(\"%d\", &n);\n\tcall(n);\n}\n\nvoid call(int n){\n\tint i = ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\" %d\"\n\t.text\n\t.p2align 4\n\t.globl\tcall\n\t.type\tcall, @function\ncall:\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\tpushq...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\" %d\"\n\t.text\n\t.p2align 4\n\t.globl\tcall\n\t.type\tcall, @function\ncall:\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\tpushq\t%r12...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void){\n\tfloat a,b;\n\tscanf(\"%f%f\",&a,&b);\n\tprintf(\"%f\",a/b);\n\treturn 0;\n}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%f%f\"\n.LC1:\n\t.string\t\"%f\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%f%f\"\n.LC1:\n\t.string\t\"%f\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %r...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void){\n\tint N,N1,N2,K,A,D;\n\tscanf(\"%d %d\", &N, &K);\n\tA = N%K;\n\tprintf(\"%d\",A);\n\treturn 0;\n}```\n\nAssembly Code:\n\n```assembl...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n\nint main() {\n\n char x;\n char y;\n\n scanf(\"%c %c\", &x, &y);\n\n if (x == y) {\n pu...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%c %c\"\n.LC1:\n\t.string\t\"=\"\n.LC2:\n\t.string\t\">\"\n.LC3:\n\t.string\t\"<\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%c %c\"\n.LC1:\n\t.string\t\"=\"\n.LC2:\n\t.string\t\">\"\n.LC3:\n\t.string\t\"<\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LF...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h> // printf(), scanf()\n#define MAX_N 100\n\nint\nmain(int argc, char** argv)\n{\n\tint x[MAX_N], y[MAX_N];\n\tint n;\n\tint i;\n\n\tscanf(\"%d\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d %d\"\n.LC4:\n\t.string\t\"%.1f\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d %d\"\n.LC4:\n\t.string\t\"%.1f\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_start...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nint n, k;\nint main(){\n scanf(\"%d%d\", &n, &k);\n if(k*2-1<= n){\n puts(\"YES\");\n }else{\n puts(\"NO\");\n }\n}```\n\nAssembly Code:\n\n```assembly\n\t.file...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"YES\"\n.LC2:\n\t.string\t\"NO\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_start...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"YES\"\n.LC2:\n\t.string\t\"NO\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nn,b,i,t;long long k=1;L(x,y){!y?k*=n/x:L(y,x%y);}main(a){for(;scanf(\"%d%d\",&a,&b,n=1)*a;L(n,k),k=++i%3<1?printf(\"%lld\\n\",k),1:k)for(t=a;t-1;t=t*a%b)++n;}```\n\nAssem...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tL\n\t.type\tL, @function\nL:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\ttestl\t%esi, %esi\n\tjne\t.L2\n\tjmp\t.L10\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\tmovl\t%edx, %esi\n.L2:\n\tcltd\n\tidivl\t%esi\n\tmovl\t%es...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tL\n\t.type\tL, @function\nL:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\ttestl\t%esi, %esi\n\tjne\t.L2\n\tjmp\t.L10\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\tmovl\t%edx, %esi\n.L2:\n\tcltd\n\tidivl\t%esi\n\tmovl\t%esi, %ea...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int n,s,m,i;\n while(scanf(\"%d\",&n),n){\n for(i=s=0;i*4<n;i++){\n scanf(\"%d\",&m);\n s+=m;\n }\n printf(\"%d\\n\"...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n \nint main(void) {\n int A, B, C;\n scanf(\"%d%d%d\",&A,&B,&C);\n if (A < C && C < B || B < C && C < A) {\n printf(\"Yes\");\n } else {\n p...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_st...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startpro...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <math.h>\n\n\n\nint main(void){\n int n,a,b;\n scanf(\"%d %d %d\",&n,&a,&b);\n for(;;){\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"Borys\"\n.LC2:\n\t.string\t\"Alice\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB51:\n\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"Borys\"\n.LC2:\n\t.string\t\"Alice\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB51:\n\t.cfi_s...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint n,m;\nint t[200001];\n\nint u[200001];\n\nint main(){\n int i;\n \n scanf(\"%d %d\",&n,&m);\n \n for(i=0;i<m;i++){\n scanf(\"%d\",&t[i]);\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_s...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startpr...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<math.h>\nmain()\n{\n\tlong long int n, p, i;\n\tscanf(\"%lld\", &n);\n\tprintf(\"%lld:\", n);\n\tfor (i=2, p=n; i<=sqrt(n); )\n\t{\n\t\tif (n%...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n.LC1:\n\t.string\t\"%lld:\"\n.LC2:\n\t.string\t\" %lld\"\n.LC4:\n\t.string\t\" %lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n.LC1:\n\t.string\t\"%lld:\"\n.LC2:\n\t.string\t\" %lld\"\n.LC4:\n\t.string\t\" %lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @functi...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nA[10000],B[10000];z(int*a,int*b){return*b-*a;}\nmain(n,i,j){for(;scanf(\"%d\",&n),n;puts(i>n?\"No\":\"Yes\")){\nfor(i=0;i<n;i++)scanf(\"%d\",A+i);\nqsort(A,n,4,z);\nfor(i...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tz\n\t.type\tz, @function\nz:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rsi), %eax\n\tsubl\t(%rdi), %eax\n\tret\n\t.cfi_endproc\n.LFE0:\n\t.size\tz, .-z\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"No\"\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tz\n\t.type\tz, @function\nz:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rsi), %eax\n\tsubl\t(%rdi), %eax\n\tret\n\t.cfi_endproc\n.LFE0:\n\t.size\tz, .-z\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"No\"\n.LC1:...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint swap(int*a,int*b){int t=*a;*a=*b;*b=t;return 1;}\nint main(void)\n{\n int n,a[100],i,j,c;\n for(;;){\n scanf(\"%d\",&n);if(!n)break;c=0;\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tswap\n\t.type\tswap, @function\nswap:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tmovl\t(%rsi), %edx\n\tmovl\t%edx, (%rdi)\n\tmovl\t%eax, (%rsi)\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tswap, .-...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tswap\n\t.type\tswap, @function\nswap:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tmovl\t(%rsi), %edx\n\tmovl\t%edx, (%rdi)\n\tmovl\t%eax, (%rsi)\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tswap, .-swap\n...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include<string.h>\n\nint main(void)\n{\n\tint i,count=0;\n\tchar s[7];\n\tscanf(\"%s\",s);\n\t\n\tfor(i=0;i<6;i++){\n\t\tif(s[i]=='1'){\n\t\t\tcount+...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint now, right, left, count;\n\nint cmp_char(char a[], char b[]);\n\nint main(void)\n{\n char input[3];\n int data, i;\n\n scanf(\"%d\",&da...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#define N 45\nint fibonacci(int);\nint fib[N];\nint main(){\n int n;\n scanf(\"%d\", &n);\n printf(\"%d\\n\", fibonacci(n));\n return 0;\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void) {\n int a, b, c, d;\n scanf(\"%d%d%d%d\", &a, &b, &c, &d);\n if (a==b&&c==d||a==c&&b==d||a==d&&b==c) printf(\"yes\\n\");\n else prin...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d%d\"\n.LC1:\n\t.string\t\"yes\"\n.LC2:\n\t.string\t\"no\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d%d\"\n.LC1:\n\t.string\t\"yes\"\n.LC2:\n\t.string\t\"no\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startp...