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//\n\n#include \"stdio.h\"\n\nint main(){\n\tchar s[200001], t[200001];\n\tchar rs[26], rt[26];\n\tscanf(\"%s\\n\", s);\n\tscanf(\"%s\\n\", t);\n\tfor (int i = 0; i < 26;...
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\"\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_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\"%s\\n\"\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...
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 a,b,c,ans=3;\n scanf(\"%d%d%d\",&a,&b,&c);\n if(a==b)\n ans--;\n if(a==c)\n ans--;\n if(b==c)\n ans--;\n if(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.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\tsu...
{ "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$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>\nint main(){\n\tint a, b;\n\tscanf(\"%d %d\", &a, &b);\n\tif(a==b)\n\tprintf(\"Yes\");\n\telse\n\tprintf(\"No\");\n\treturn 0;\n}```\n\nAssembly Code:\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\"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_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\"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...
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 ll long long\nint main(){\n int n;\n scanf(\"%d\",&n);\n ll d[n];\n for(int i = 0; i < n; i++)\n scanf(\"%lld\",&d[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\"%lld\"\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\nm...
{ "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\"%lld\"\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:\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\nint n,a,b,M[1<<20]={1},i,k;\nmain(){\n scanf(\"%d%d%d\",&n,&a,&b);\n if(n>1L*a*b||n<a+b-1) puts(\"-1\");\n else{\n int N=b,C=n;\n while(1){\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\"-1\"\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.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\"%d%d%d\"\n.LC1:\n\t.string\t\"-1\"\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.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\nint main(void)\n{\n\tint s, sum = 0;\n\tint i;\n\n\tfor (i = 0; i < 10; i++) {\n\t\tscanf(\"%d\", &s);\n\t\tsum += s;\n\t}\n\tprintf(\"%d\\n\", sum)...
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\nint main(){\n int N, X, T;\n scanf(\"%d%d%d\", &N, &X, &T);\n if (N%X!=0) printf(\"%d\",T*(N/X+1));\n else printf(\"%d\", T*N/X);\n}```\n\nA...
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\tsubq\...
{ "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>\n\nvoid\tattack(long long int H, long long int N, long long int *T)\n{\n \tif (H == 1)\n {\n \tH = 0;\n \t*T += N;\n \tN = 0;\n }...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tattack\n\t.type\tattack, @function\nattack:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t(%rdx), %rax\n\tcmpq\t$1, %rdi\n\tje\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tmovq\t%rdi, %rcx\n\taddq\t%rsi, %rax\n\taddq\t%rsi, %rsi\n...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tattack\n\t.type\tattack, @function\nattack:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t(%rdx), %rax\n\tcmpq\t$1, %rdi\n\tje\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tmovq\t%rdi, %rcx\n\taddq\t%rsi, %rax\n\taddq\t%rsi, %rsi\n\tshrq...
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\tint C1, C2, i, j, len;\n\tchar S[100010];\n\tscanf(\"%s\", &S);\n\tlen = strlen(S);\n\n\tC1 = 0;\n\tj = len...
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%rbx\...
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 a,b,x;\n long cnt;\n scanf(\"%ld %ld %ld\",&a,&b,&x);\n cnt=b/x-a/x+(a%x==0?1:0);\n printf(\"%ld\\n\",cnt);...
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\"\n.LC1:\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_startproc\n\tendbr64...
{ "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\"\n.LC1:\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_startproc\n\tendbr64\n\tsu...
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 max(int a,int b){\n if(a+b>=a-b&&a+b>=a*b)\n return a+b;\n else if(a-b>=a+b&&a-b>=a*b)\n return a-b;\n else\n return a*b;\n}\nint main(...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tmax\n\t.type\tmax, @function\nmax:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %edx\n\tmovl\t%edi, %eax\n\timull\t%esi, %edi\n\tsubl\t%esi, %eax\n\tmovl\t%edi, %ecx\n\tcmpl\t%edi, %edx\n\tcmovge\t%edx, %ecx\n\tcmpl\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tmax\n\t.type\tmax, @function\nmax:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %edx\n\tmovl\t%edi, %eax\n\timull\t%esi, %edi\n\tsubl\t%esi, %eax\n\tmovl\t%edi, %ecx\n\tcmpl\t%edi, %edx\n\tcmovge\t%edx, %ecx\n\tcmpl\t%edi, ...
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 b, r, g, c, s, t, medal;\n\n while (1) {\n scanf(\"%d %d %d %d %d %d\", &b, &r, &g, &c, &s, &t);\n if (t == 0) break;...
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 %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\ten...
{ "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 %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\...
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 ARC065 C - Daydream\n// 2019.8.27 bal4u\n\n#include <stdio.h>\n#include <string.h>\n\n#define gc() getchar_unlocked()\n\nint ins(char *s) { // 文字列の入力 スペース以下の文字...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tins\n\t.type\tins, @function\nins:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rdi, %rbp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 3, -24\n\tleaq\t-1(%...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tins\n\t.type\tins, @function\nins:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rdi, %rbp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 3, -24\n\tleaq\t-1(%rdi), ...
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\nint main(){\n long N,M,ans;\n scanf(\"%ld%ld\",&N,&M);\n ans=(N-2)*(M-2);\n\n if (N==1||M==1)\n {\n printf(\"%d\",abs(ans...
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\"%d\"\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.LFB39:\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\"%ld%ld\"\n.LC1:\n\t.string\t\"%d\"\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.LFB39:\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\nint main() {\n int n = 0;\n scanf(\"%d\\n\", &n);\n int min_abs = 1000000001;\n long long int ...
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\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\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.LFB51:\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\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\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.LFB51:\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{\n int a, b, c, k;\n scanf(\"%d %d %d %d\", &a, &b, &c, &k);\n \n // k <= a + b + c\n // k - (a + b) <= c\n int minC = 0;\n if (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.LC0:\n\t.string\t\"%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\...
{ "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\"%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...
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;\n scanf(\"%d%d%d\",&a,&b,&c);\n if( (a == 1 && b == 1) || (c == 1) ) {\n puts(\"Open\");\n } else {\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\"%d%d%d\"\n.LC1:\n\t.string\t\"Open\"\n.LC2:\n\t.string\t\"Close\"\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\"Open\"\n.LC2:\n\t.string\t\"Close\"\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/*\n\tsubmission # - User: herp_sy\n\thttps://atcoder.jp/contests/\n\n\tcoding: utf-8\n\tlang: C (GCC 5.4.1)\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <str...
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 %s %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.LFB51:\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 %s %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.LFB51:\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\nn;R(a,b,c){n--?R(b,c,a+b+c):printf(\"%d\\n\",~-c/3650+1);}main(){for(;~scanf(\"%d\",&n);n&&R(0,0,1));}```\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\"%d\\n\"\n\t.text\n\t.p2align 4\n\t.globl\tR\n\t.type\tR, @function\nR:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\tn(%rip), %ecx\n\tleal\t-1(%rcx), %eax\n\tmovl\t%eax, n(%rip)\n\ttestl\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\"\n\t.text\n\t.p2align 4\n\t.globl\tR\n\t.type\tR, @function\nR:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\tn(%rip), %ecx\n\tleal\t-1(%rcx), %eax\n\tmovl\t%eax, n(%rip)\n\ttestl\t%ecx, ...
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[2000],i,j,n,m,x,y,z=0;\n \n scanf(\"%d\",&n);\n for (size_t i = 0; i < n; i++)\n {\n scanf(\"%d\",&b[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%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>\n\nint main(void){\n\n int a,b;\n int i;\n\n scanf(\"%d %d\",&a,&b);\n\n if(a <= 5){\n i = 0;\n } else if(a >= 6 && a <= 12){\n i = b/2;\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>\n#include <stdlib.h>\n\nint N;\nint d_i[100];\n\nint cmpnum(const void *n1,const void *n2){\n if(*(int *)n1<*(int *)n2)\n\treturn -1;\n else if(*...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmpnum\n\t.type\tcmpnum, @function\ncmpnum:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rsi), %eax\n\tcmpl\t%eax, (%rdi)\n\tmovl\t$-1, %edx\n\tsetg\t%al\n\tmovzbl\t%al, %eax\n\tcmovl\t%edx, %eax\n\tret\n\t.cfi_endproc\n.LFE39:\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmpnum\n\t.type\tcmpnum, @function\ncmpnum:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rsi), %eax\n\tcmpl\t%eax, (%rdi)\n\tmovl\t$-1, %edx\n\tsetg\t%al\n\tmovzbl\t%al, %eax\n\tcmovl\t%edx, %eax\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.si...
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() {\n\tint i;\n\tint\tN;\n\tint flag = 0;\n\tint check;\n\tint a[100100];\n\n\tscanf(\"%d\", &N);\n\n\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\"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\"%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_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//b.c B-String Rotation\n#include<stdio.h>\n#include<string.h>\n#include<stdbool.h>\n\nint main(void){\n char buf1[201],buf2[201],buf3[201];\n bool flag = false;\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.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.LFB35:\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.LFB35:\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#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include <math.h>\n#include <limits.h>\n#define swap(type,a,b) do{type t=a;a=b;b=t;}while...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tMAX\n\t.type\tMAX, @function\nMAX:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%edi, %esi\n\tmovl\t%edi, %eax\n\tcmovge\t%esi, %eax\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.size\tMAX, .-MAX\n\t.p2align 4\n\t.globl\tMIN\n\t.type\tMIN, ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tMAX\n\t.type\tMAX, @function\nMAX:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%edi, %esi\n\tmovl\t%edi, %eax\n\tcmovge\t%esi, %eax\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.size\tMAX, .-MAX\n\t.p2align 4\n\t.globl\tMIN\n\t.type\tMIN, @funct...
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(){\n int L;\n scanf(\"%d\",&L);\n printf(\"%.12f\\n\",(double)L*L*L/27);\n }\n```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\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\"\n.LC2:\n\t.string\t\"%.12f\\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\"\n.LC2:\n\t.string\t\"%.12f\\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\ni,j=99;main(a){for(;j>98?j=!puts(\"98 99\"-!!i),i++%49||~scanf(\"%d\",&a):1;)putchar((~i*++j%2&&a-->1)^i>47?46:35);}```\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\"98 99\"\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\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\"98 99\"\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\tpushq\t%r13\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\tint a, b;\n\tif (scanf(\"%d%d\", &a, &b) != 2) return 1;\n\tprintf(\"%d\\n\", b >=a ? a : a - 1);\n\treturn 0;\n}\n```\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\"\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...
{ "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 <limits.h>\n\nint main() {\n long int n, a, min = LONG_MAX;\n scanf(\"%ld\", &n);\n for (int i = 0; i < 5; i++) {\n scanf(\"%ld\", &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.LC0:\n\t.string\t\"%ld\"\n.LC1:\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_startproc\n\tendbr64\n\tpush...
{ "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\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%r1...
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,P;\n scanf(\"%d %d\",&A,&P);\n printf(\"%d\",(3*A+P)/2);\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, %...
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\nint main()\n{\n\tint i, j, H, W;\n\tchar s[52][52] = {};\n\tscanf(\"%d %d\", &H, &W);\n\tfor (i = 1; i <= H; i++) scanf(\"%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\"%d %d\"\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, @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\"%d %d\"\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, @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\n#include <stdio.h>\n\nint main()\n{\n\tint N;\n\tscanf(\"%d\", &N);\n\tswitch (N) {\n\tcase 1:\n\tcase 2:\n\tcase 3:\n\tcase 5:\n\tcase 6:\n\tcase 9:\n\tcase 10:\n\tcase ...
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.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\"%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.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\tmain(void)\n{\n \tint\tN;\n \tint A[101];\n \tint\ti;\n \tdouble\tB[101];\n \tdouble\tsum;\n \n \tscanf(\"%d\\n\", &N);\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.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"%d\"\n.LC4:\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_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\\n\"\n.LC2:\n\t.string\t\"%d\"\n.LC4:\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\...
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#define MOD 1000000007\ntypedef long long int ll;\n\nint main(void){\n\n int n, *list;\n int p = 0, q = 0;\n ll k, ps = 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\"%d %lld\"\n.LC1:\n\t.string\t\"%d\"\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.LFB39:\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 %lld\"\n.LC1:\n\t.string\t\"%d\"\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.LFB39:\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>\nint main()\n{\n int m,n,a[100000],b[100000],i,j,cnt=0,str[1000]={0},max=0;\n scanf(\"%d%d\",&n,&m);\n for(i=0;i<n;i++)\n {\n scanf(\...
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>\nint main(void)\n{\n\tint a, b, d, r;\n\tdouble f;\n\tscanf(\"%d %d\", &a, &b);\n\n\td = a / b;\n\tr = a % b;\n\tf = (double)a / b;\n\n\tprintf(\"%d %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 %d\"\n.LC1:\n\t.string\t\"%d %d %f\\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\...
{ "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 %f\\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...
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 NMAX 100001\n#define qMAX 50000\n \nint S[NMAX];\nint T[qMAX];\n \nint binarySearch(int n,int key) {\n int left = 0;\n int right = n;\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tbinarySearch\n\t.type\tbinarySearch, @function\nbinarySearch:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%ecx, %ecx\n\tleaq\tS(%rip), %r8\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tleal\t(%rcx,%rdi), %edx\n\tmovl\t%edx...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tbinarySearch\n\t.type\tbinarySearch, @function\nbinarySearch:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%ecx, %ecx\n\tleaq\tS(%rip), %r8\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tleal\t(%rcx,%rdi), %edx\n\tmovl\t%edx, %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\na,b,x,y,v,w,S;I(){scanf(\"%d%d\",&x,&y);}main(i,n){for(;scanf(\"%d\",&n)*n;S=!printf(\"%d %.1f\\n\",i++,S/2.))for(I(),a=x,b=y;n--;S+=(x-v)*(y+w))v=x,w=y,!n?x=a,y=b: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\t.text\n\t.p2align 4\n\t.globl\tI\n\t.type\tI, @function\nI:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleaq\ty(%rip), %rdx\n\tleaq\tx(%rip), %rsi\n\txorl\t%eax, %eax\n\tleaq\t.LC0(%...
{ "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\t.text\n\t.p2align 4\n\t.globl\tI\n\t.type\tI, @function\nI:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleaq\ty(%rip), %rdx\n\tleaq\tx(%rip), %rsi\n\txorl\t%eax, %eax\n\tleaq\t.LC0(%rip), ...
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\ni,r=-1;main(n,t,e,x){for(scanf(\"%d%d%d\",&n,&t,&e);i<n;r=t-e>(t+e)/x*x?r:i+1,i++)scanf(\"%d\",&x);r=!printf(\"%d\\n\",r);}```\n\nAssembly Code:\n\n```assembly\n\t.file\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.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.LFB0:\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%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.LFB0:\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{\n\tchar s[17];\n\tchar *t= \"CODEFESTIVAL2016\";\n\tint i,count=0;\n\n\tscanf(\"%s\", s);\n\n\tfor (i = 0; i < 16; i++) {\n\t\tif (s[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\"%s\"\n.LC3:\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...
{ "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.LC3:\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, %rsp...
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\tchar X, Y;\n\t\tscanf(\"%c %c\", &X, &Y);\n\t\tif (X > Y) {\n\t\t\tprintf(\">\\n\");\n\t\t}\n\t\telse if (X < Y) {\n\t\t\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\"%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\nn,p,a,b,m,k;main(){for(;scanf(\"%d\",&n),n;m=!printf(\"%d %d\\n\",k,m))for(;n--;a+b>m&&(k=p,m=a+b))scanf(\"%d%d%d\",&p,&a,&b);}```\n\nAssembly Code:\n\n```assembly\n\t.fi...
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\"\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.LFB0:\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\"\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.LFB0:\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>\n#include<stdlib.h>\n#include<string.h>\n#include<math.h>\n\n#define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf(\"not enough memory\\n\");ex...
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\"not enough memory\"\n.LC2:\n\t.string\t\"%ld%ld\"\n.LC3:\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...
{ "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\"not enough memory\"\n.LC2:\n\t.string\t\"%ld%ld\"\n.LC3:\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...
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;\n scanf(\"%*d%*d%*d%d\", &a);\n printf(\"%d\\n\", a == 1 ? 1 : 0);\n return 0;\n}```\n\nAssembly Code:\n\n```assembly...
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\"%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\...
{ "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\"%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...
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;\n scanf(\"%d %d\", &a, &b);\n printf(\"%d\\n\", ( a + b ) / 2);\n return 0;\n}```\n\nAssembly Code:\n\n```assembly\...
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 <stdlib.h>\n#include <string.h>\n#include <math.h>\n\nint main(int argc, char* argv[]){\n\tlong long A, B, N;\n\tscanf(\"%lld %lld %lld\", &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.LC0:\n\t.string\t\"%lld %lld %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.LFB51:\n\t.cfi_startproc\n\tend...
{ "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 %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.LFB51:\n\t.cfi_startproc\n\tendbr64\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 int s1[5],s2[5];\n int sum,max,max_i;\n\n while(1){\n sum=0;\n max=0;\n for(int i=0;i<5;i++){\n scanf(\"%d %d\",&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\"%d %d\"\n.LC1:\n\t.string\t\"%c %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\"\n.LC1:\n\t.string\t\"%c %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\...
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\t\n\tint a,b,c;\n\t\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\t\n\tif(a<b && b<c){\n\t\tprintf(\"Yes\\n\");\n\t}\n\telse{\n\t\tprintf(\"No\\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\"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#include<stdlib.h>\n#define ll long long\nint upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}\nvoid sortup(ll*a,int n){...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tupll\n\t.type\tupll, @function\nupll:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t(%rsi), %rax\n\tcmpq\t%rax, (%rdi)\n\tmovl\t$-1, %edx\n\tsetg\t%al\n\tmovzbl\t%al, %eax\n\tcmovl\t%edx, %eax\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.si...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tupll\n\t.type\tupll, @function\nupll:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t(%rsi), %rax\n\tcmpq\t%rax, (%rdi)\n\tmovl\t$-1, %edx\n\tsetg\t%al\n\tmovzbl\t%al, %eax\n\tcmovl\t%edx, %eax\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.size\tup...
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 A1,A2,A3;\n\t\n\tscanf(\"%d%d%d\", &A1, &A2, &A3);\n\tif (A1+A2+A3 >= 22){\n\t\tprintf(\"bust\\n\");\n\t}else{\n\t\tprintf(\"win\...
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\"bust\"\n.LC2:\n\t.string\t\"win\"\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\"bust\"\n.LC2:\n\t.string\t\"win\"\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\nmain(){int a,b,i;scanf(\"%d%d\",&a,&b);for(i=1;i<4;i++){if(a!=i&&b!=i)printf(\"%d\",i);}}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\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.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>\nint main(void){\n\tint E,Y;\n\tscanf(\"%d %d\",&E,&Y);\n\tif(E==0){\n\t\tif(1989<=Y&&Y<=2016){\n\t\t\tprintf(\"H%d\\n\",Y-1988);\n\t\t}\n\t\telse if(19...
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\"H%d\\n\"\n.LC2:\n\t.string\t\"S%d\\n\"\n.LC3:\n\t.string\t\"T%d\\n\"\n.LC4:\n\t.string\t\"M%d\\n\"\n.LC5:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax...
{ "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\"H%d\\n\"\n.LC2:\n\t.string\t\"S%d\\n\"\n.LC3:\n\t.string\t\"T%d\\n\"\n.LC4:\n\t.string\t\"M%d\\n\"\n.LC5:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@pr...
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\tint x,y,z;\n\tscanf(\"%d\",&x);\n\tgetchar();\n\tscanf(\"%d\",&y);\n\tgetchar();\n\tz=6-x-y;\n\tprintf(\"%d\",z);\n\treturn 0;\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\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\n#include <stdio.h>\nint main(void)\n{\n char s[100001],t[50001];\n int m=0,n=0;\n \n scanf(\"%s\",s);\n while((s[m]>='a')&&(s[m]<='z')){\n t[n]=s[m]...
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%rbx\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%rbx\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()\n{\n int a,b,c,d;\n scanf(\"%d%d%d%d\",&a,&b,&c,&d);\n if (a != c)\n printf(\"%d\",1);\n else\n printf(\"0\");\n}```\n\nAssembl...
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\"%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%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>\n\nint main()\n{\n long long int a, c;\n scanf(\"%lld%lld\", &a, &c);\n \n long long int y= c/2;\n printf(\"%lld\\n\", a+y);\n return ...
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\"\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...
{ "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\"\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...
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;\n scanf(\"%d %d\",&a,&b);\n\n if(a*b%2==0)printf(\"Even\\n\");\n else printf(\"Odd\\n\");\n return 0;\n}\n\n```\n\nAsse...
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\"Even\"\n.LC2:\n\t.string\t\"Odd\"\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\"Even\"\n.LC2:\n\t.string\t\"Odd\"\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 int X, A, B;\n scanf(\"%d %d %d\", &X, &A, &B);\n\n int distA = (A < X) ? X - A : A - X;\n int distB = (B < X) ? X - B : B - 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\"%d %d %d\"\n.LC1:\n\t.string\t\"A\"\n.LC2:\n\t.string\t\"B\"\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 %d\"\n.LC1:\n\t.string\t\"A\"\n.LC2:\n\t.string\t\"B\"\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\nint n,i;\n\nscanf(\"%d\",&n);\n\nint a[n];\n\nfor(i=0;i<n;i++){\nscanf(\"%d\",&a[i]);\n}\n\nfor(i=0;i<n;i++){\nif(a[i]%2==0){\nif(...
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\"APPROVED\"\n.LC2:\n\t.string\t\"DENIED\"\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.c...
{ "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\"APPROVED\"\n.LC2:\n\t.string\t\"DENIED\"\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...
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 A, B, C, D;\n\tscanf(\"%d %d %d %d\", &A, &B, &C, &D);\n\tif (A + B > C + D) printf(\"Left\\n\");\n\telse if (A + B < C + D) pr...
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\"Left\"\n.LC2:\n\t.string\t\"Right\"\n.LC3:\n\t.string\t\"Balanced\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tm...
{ "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\"Left\"\n.LC2:\n\t.string\t\"Right\"\n.LC3:\n\t.string\t\"Balanced\"\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>\nint main(void){\n int R,B,W,G;\n scanf(\"%d%d%d%d\",&R,&B,&W,&G);\n printf(\"%d\\n\",R+B+W+G);\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\"%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...
{ "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\"%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#include <string.h>\n#include <stdlib.h>\n#define MIN(a, b) (a<b?a:b)\n\nint cmp(const void *a, const void *b) {\n\treturn *(int*)b - *(int*)a;\n}\n\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmp\n\t.type\tcmp, @function\ncmp:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rsi), %eax\n\tsubl\t(%rdi), %eax\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.size\tcmp, .-cmp\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.str...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmp\n\t.type\tcmp, @function\ncmp:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rsi), %eax\n\tsubl\t(%rdi), %eax\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.size\tcmp, .-cmp\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\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 a,b,c;\n\tscanf(\"%d %d\",&a,&b);\n\tc=a+b;\n\tc=c/2;\n\tprintf(\"%d\\n\",c); \n\treturn 0;\n}\n```\n\nAssembly Code:\n\n```ass...
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 abs(int n)\n{\n\tif (n < 0)\n\t\tn *= -1;\n\treturn n;\n}\nint main()\n{\n\tint n;\n\tscanf(\"%d\", &n);\n\tint i;\n\tint t[100005], x[100005], y[1...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tabs\n\t.type\tabs, @function\nabs:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tnegl\t%eax\n\tcmovs\t%edi, %eax\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tabs, .-abs\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.L...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tabs\n\t.type\tabs, @function\nabs:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tnegl\t%eax\n\tcmovs\t%edi, %eax\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tabs, .-abs\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\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// Problem B\n\n#include <stdio.h>\n//~ #include <iostream>\n//~ #include <vector>\n#include <string.h>\n//~ #include <cassert>\n//~ #include <algorithm>\n//~ #include <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\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%r12\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%r12\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#include<stdlib.h>\n\ntypedef long long int int64;\n\nvoid run(void){\n int n;\n scanf(\"%d\",&n);\n int *a=(int *)malloc(sizeof(int)*n);\n int 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\"-1\"\n.LC2:\n\t.string\t\"%lld\\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%r14\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\"\n.LC1:\n\t.string\t\"-1\"\n.LC2:\n\t.string\t\"%lld\\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%r14\n\t.cfi_de...
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,B;\n\n scanf(\"%d %d\",&A,&B);\n if((A*B*1)%2!=0 || (A*B*2)%2!=0 || (A*B*3)%2!=0)\n printf(\"Yes\");\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\"%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_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\"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...
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 int n,ans=0;\n scanf(\"%d\",&n);\n int d[n];\n for(int i=0;n>i;++i)\n scanf(\"%d\",&d[i]);\n fo...
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.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\"%d\"\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>\n//#include <stdlib.h>\n//#include <string.h>\n//#include <stdbool.h>\n//#include <limits.h>\n//#include <math.h>\n\nint main() {\n long n, k;\n scan...
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\"%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_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\"%ld%ld\"\n.LC1:\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_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#define L long long\nm[31][50];main(n,p,d,x){L a[50],b;for(;scanf(\"%d\",&n),n;){memset(m,0,6200);for(p=0;p<n;a[p]=1LL<<p,p++)for(scanf(\"%d\",&x);x;x--)scanf(\"%d\",&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.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"-1\"\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\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"-1\"\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\n#include<stdio.h>\n#include<stdlib.h>\n#include<string.h>\n#include<stdbool.h>\n#include<math.h>\n#include<limits.h>\n#define MAX 200002\nint main(){\n int N,K;\n 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\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\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\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\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\n/* ABC173 A */\n\n#include<stdio.h>\n\nint main(void){\n int n, output;\n scanf(\"%d\", &n);\n\n if(n%1000==0) output=0;\n else{\n output = n%1000;\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\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\nint main() {\n int i = 0;\n int total = 0;\n int point = 0;\n for(i = 0; i < 5; ++i) {\n scanf(\"%d\", &point);\n (point < 40) ? (total +=...
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\nvoid sort(int *a);\n\nint main(void)\n{\n\tint n,k;\n\tint i,j;\n\tchar tmp[11];\n\tint cnt[26] = {0};\n\tint result= 0;\n\t\n\tscanf(\"%d %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 %d\\n\"\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.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\\n\"\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...
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\twhile(1){\n\t\tint a[5], b[3]={0}, i, flag=1, count=0;\t\n\t\t\n\t\tfor(i=0; i<5; i++){\n\t\t\tscanf(\" %d\", &a[i]);\n\t\t\tif(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.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%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#include<string.h>\n#define N 1000\n\nint main(){\n int i,j,n,k=0,sum=0,tlen,plen,v[N];\n char T[N],P[N];\n\n scanf(\"%s%s\",T,P);\n tlen=strlen(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\"%s%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\tpush...
{ "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%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%r1...
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 x,y,i,j,a=0;\n\tscanf(\"%d%d\", &x, &y);\n\tswitch (x)\n\t{\n\t\tcase 1: i = 300000; break;\n\t\tcase 2: i = 200000; break;\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\"\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...
{ "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(void){\n long long int i,j,k,n,ans=0;\n\tscanf(\"%lld\",&n);\n\n for(i=1;i*(i+1)<n;i++){\n if(n%i==0){\n j = n/i-1;\n ans+=j;\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.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsu...
{ "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.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$2...
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 n, ac = 0, wa = 0, tle = 0, re = 0, i;\n char str[4];\n\n scanf(\"%d\", &n);\n\n for (i = 0; i < n; i++) {\n 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\"%d\"\n.LC1:\n\t.string\t\"%s\"\n\t.section\t.rodata.str1.8,\"aMS\",@progbits,1\n\t.align 8\n.LC2:\n\t.string\t\"AC x %d\\nWA x %d\\nTLE x %d\\nRE x %d\"\n\t.section\t.text.startup,\"ax\",@...
{ "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\t.section\t.rodata.str1.8,\"aMS\",@progbits,1\n\t.align 8\n.LC2:\n\t.string\t\"AC x %d\\nWA x %d\\nTLE x %d\\nRE x %d\"\n\t.section\t.text.startup,\"ax\",@progbi...
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\nint main()\n{\n int n=0,besn=0,T=0,A=0,hei,tema=0,td=0;\n scanf(\"%d\",&n);\n scanf(\"%d %d\",&T,&A);\n\n for(int 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 %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\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\"%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.LFB39:\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 kiriage( double x )\n{\n return (int)( x < 0.0 ? x : x+0.9 );\n}\n\nint main(){\n int i,j,k,right,ans;\n int N,K;\n scanf(\"%d %d\",&N,&K);...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tkiriage\n\t.type\tkiriage, @function\nkiriage:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpxor\t%xmm1, %xmm1\n\tcomisd\t%xmm0, %xmm1\n\tja\t.L7\n\taddsd\t.LC1(%rip), %xmm0\n.L7:\n\tcvttsd2sil\t%xmm0, %eax\n\tret\n\t.cfi_endproc\n.LFE2...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tkiriage\n\t.type\tkiriage, @function\nkiriage:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpxor\t%xmm1, %xmm1\n\tcomisd\t%xmm0, %xmm1\n\tja\t.L7\n\taddsd\t.LC1(%rip), %xmm0\n.L7:\n\tcvttsd2sil\t%xmm0, %eax\n\tret\n\t.cfi_endproc\n.LFE23:\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()\n{\n int a,b;\n scanf(\"%d %d\",&a,&b);\n if((a+b)%2==1){\n printf(\"%d\",(a+b)/2+1);\n }\n else{\n printf(\"%d\",(a+b)...
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#define rep(i, n) for (int i = 0; i < (int)(n); i++)\n\nint main(void)\n{\n int n, a[100100];\n scanf(\"%d\", &n);\n rep(i, n)\n scanf...
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\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%...
{ "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\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\...
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/*\n A2738\n title:A un breathing\n @kanki573\n\n */\n\n#include <stdio.h>\n\nint main()\n{\n int n,i,a,b,flag;\n char s[3];\n\n scanf(\"%d\",&n);\n for(i=a=b=0,fl...
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\"YES\"\n.LC2:\n\t.string\t\"%s\"\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\nmai...
{ "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\"YES\"\n.LC2:\n\t.string\t\"%s\"\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:\n.L...
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 r,d,x;\n\n scanf(\"%d %d %d\",&r,&d,&x);\n\n for(int i = 0; i < 10; i++){\n x = r*x - d;\n printf(\"%d\\n\", 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\"%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\tpushq\...
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 str1[17] = \"CODEFESTIVAL2016\";\n\tchar tmp[17];\n\tint i,count=0;\n\t\n\tscanf(\"%s\",tmp);\n\t\n\tfor(i=0; i < 16; 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\"%s\"\n.LC3:\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...
{ "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.LC3:\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, %rsp...
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#define ll long long int\nint main(void){\n\tll N,A,B,ans;\n\tscanf(\"%lld%lld%lld\",&N,&A,&B);\n\tif(A>B)ans=0;\n\telse if(N==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\"%lld%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.LFB39:\n\t.cfi_startproc\n\tendbr64\...
{ "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%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.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tsub...
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 n, m, k;\n int i,j;\n\n scanf(\"%d%d%d\", &n, &m, &k);\n\n for (i = 0; i <= n; i++)\n {\n //printf(\"i:%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%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<string.h>\n\nint main(void){\n char s[12],t[12];\n scanf(\"%s\",s);\n scanf(\"%s\",t);\n for(int i=0;i<strlen(s);i++){\n if(s[i]!=t[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\"%s\"\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.LFB35:\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\"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.LFB35:\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()\n{\n\tint X;\n\tscanf(\"%d\", &X);\n\tprintf(\"%d\\n\", X / 500 * 1000 + X % 500 / 5 * 5);\n\tfflush(stdout);\n\treturn 0;\n}```\n\nAssem...
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>\nint main(void){\nint n;\n scanf(\"%d\",&n);\n long h[n];\n \n for(int i=0;i<n;i++){\n\tscanf(\"%ld\",&h[i]);\n }\n for(int i=n-1;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\"%ld\"\n.LC2:\n\t.string\t\"No\"\n.LC3:\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\nma...
{ "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\"%ld\"\n.LC2:\n\t.string\t\"No\"\n.LC3:\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....
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,b;\n while(scanf(\"%d %d\",&a,&b)!=EOF)printf(\"%d\\n\",a+b);\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\"\n.LC1:\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_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.LC0:\n\t.string\t\"%d\\n\"\n.LC1:\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_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\nmain(){\n int a[334]={0,300000,200000,100000},b,c;\n scanf(\"%d%d\",&b,&c);\n printf(\"%d\",a[b]+a[c]+(b*c==1)*400000);\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.LC1:\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.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$1...
{ "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.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.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$1368, %...
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,i,s = 0;\n for(i = 0 ; i < 4 ; i++){\n scanf(\"%d\",&a);\n s += a;\n }\n printf(\"%d\\n%d\\n\",s/60,s%60);\n return 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\"%d\"\n.LC1:\n\t.string\t\"%d\\n%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\"\n.LC1:\n\t.string\t\"%d\\n%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\tint W, H, C, z1, z2, z3, z4, G, X;\n\tscanf(\"%d %d %d\", &W, &H, &C);\n\tz1 = W*H;\n\tG = H;\n\tX = W;\n\tif (X < G) {\n\t\tz2 = 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 %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>\n\nint main() {\n int n, k, h = 1;\n scanf(\"%d %d\", &n, &k);\n for(int i = 1; i <= n; i++){\n if(h <= k){\n h *= 2;\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#include<string.h>\nint main(void)\n{\n long int i,j,sum = 0,a,k;\n char s[11];\n scanf(\"%s\",s);\n a = strlen(s);\n for(i = 0 ; 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\"%s\"\n.LC1:\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.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\"%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.LFB35:\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 <string.h>\n#include <stdbool.h>\n\nint main()\n{\n char str[200001]=\"\";\n int cot=0,p_a=0,len=0;\n bool ex_a=false;\n scanf(\"...
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\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%r...
{ "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\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%rbx\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(){\n \n int n,i=0,lo[52]={},cnt=0;\n long long r=1;\n char sa[53],sb[53];\n scanf(\"%d%s%s\",&n,sa,sb);\n for(i=0;i<n;i++){\n if(sa[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%s%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\"%d%s%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\tpushq\...
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 b[3], i;\n\t\n\tfor (i = 0; i < 3; i++){\n\t\tscanf(\"%d\", &b[i]);\n\t}\n\t\n\tif (b[0] + b[1] == 2 || b[2]){\n\t\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\"Open\"\n.LC2:\n\t.string\t\"Close\"\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\"\n.LC1:\n\t.string\t\"Open\"\n.LC2:\n\t.string\t\"Close\"\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...