data_source
stringclasses
1 value
prompt
listlengths
1
1
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<string.h>\n#define SMAX 100000\nint main(void)\n{\n int i, slen, ans;\n char x, str[SMAX+1];\n scanf(\"%s%*c\", str);\n slen = strlen(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\"%s%*c\"\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\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\"%s%*c\"\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%r...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n\tint s,i,cnt=0;\n\tchar n[100001];\n\tscanf(\"%d\",&s);\n\tscanf(\"%s\",n);\n\tfor(i=0;i<s;i++){\n\t\tif(n[i]=='O' && n[i+1]=='X' || 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\"%s\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void) {\n\tint R0, W0, C, R;\n\twhile (scanf(\"%d%d%d%d\", &R0, &W0, &C, &R) == 4 && (R0 | W0 | C | R) != 0) {\n\t\tint fusoku = R0 < C * W...
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%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\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.LC1:\n\t.string\t\"%d%d%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\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<string.h>\n\nint main(){\n int i, len;\n\n char str[200001];\n\n scanf(\"%s\", str);\n\n len=strlen(str);\n\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.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>\nlong int sq(long int n) {\n long int l=0,r=n,m;\n while (r-l>1L){m=(r+l)/2L;if(0<n/m/m)l=m;else r=m;}\n return l-(l*l==n);\n}\nint main(){\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tsq\n\t.type\tsq, @function\nsq:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %r8\n\txorl\t%esi, %esi\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tleaq\t(%rsi,%r8), %rdx\n\tmovq\t%rdi, %rax\n\tmovq\t%rdx, %rcx\n\tshrq...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tsq\n\t.type\tsq, @function\nsq:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %r8\n\txorl\t%esi, %esi\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tleaq\t(%rsi,%r8), %rdx\n\tmovq\t%rdi, %rax\n\tmovq\t%rdx, %rcx\n\tshrq\t$63,...
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 N, A ,B;\n\tscanf(\"%d%d%d\",&N, &A, &B);\n\tchar s[N + 1];\n\tscanf(\"%s\", s);\n\tint i = 0;\n\tint count = 0;\n\tint bco...
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\"%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\...
{ "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\"%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, A, B;\n\tscanf(\"%d %d %d\", &N, &A, &B);\n\tif ((B - A) % 2 == 0) printf(\"Alice\\n\");\n\telse printf(\"Borys\\n\");\n\tff...
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\"Alice\"\n.LC2:\n\t.string\t\"Borys\"\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...
{ "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\"Alice\"\n.LC2:\n\t.string\t\"Borys\"\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...
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 char s[101];\n scanf(\"AtCoder %s Contest\", &s);\n char x = s[0];\n printf(\"A%cC\\n\",x);\n return 0;\n}```\n\nAs...
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\"AtCoder %s Contest\"\n.LC1:\n\t.string\t\"A%cC\\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\...
{ "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\"AtCoder %s Contest\"\n.LC1:\n\t.string\t\"A%cC\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr...
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,k;\n scanf(\"%d%d%d\",&a,&b,&k);\n\n int i,ans=0;\n for(i=a;i<b+1;i++)\n if((i<a+k)||(i>b-k))\n printf(\"%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\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpu...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n// Aizu Vol-1 0130: Train\n// 2017.8.3\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <ctype.h>\n\nchar *gets(char *);\nchar buf[1100], *p;\nch...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB53:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 15, -16\n\tpushq\t%r14\n\t.cfi_def_cfa_offset 24\n\t.cfi...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB53:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 15, -16\n\tpushq\t%r14\n\t.cfi_def_cfa_offset 24\n\t.cfi_offse...
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 <ctype.h>\n\nint main(void) {\n\tchar sikibetushi[200];\n\tchar kisoku[2];\n\tchar* sbp;\n\twhile(1) {\n\t\tscanf(\"%s%s\",sikibetushi,kisoku...
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\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB25:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\n\t.cfi_def_cfa_offse...
{ "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\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB25:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\n\t.cfi_def_cfa_offset 16\n...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void){\n\nunsigned int a,b,n;\n\nscanf(\"%u %u %u\",&a,&b,&n);\n\nint i;\nfor(i = 0;i < n/2; i++){\n\nif(a%2 == 1) a -= 1;\n\nb += a/2;\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\"%u %u %u\"\n.LC1:\n\t.string\t\"%u %u\"\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\"%u %u %u\"\n.LC1:\n\t.string\t\"%u %u\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void){\nint i,j,n,b,a;\nint s[11][7]={{0,1,1,1,1,1,1},{0,0,0,0,1,1,0},{1,0,1,1,0,1,1},{1,0,0,1,1,1,1},{1,1,0,0,1,1,0},{1,1,0,1,1,0,1},{1,1,1,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.LC1:\n\t.string\t\"%d\"\n.LC3:\n\t.string\t\"\"\n\t.section\t.rodata\n\t.align 32\n.LC0:\n\t.long\t0\n\t.long\t1\n\t.long\t1\n\t.long\t1\n\t.long\t1\n\t.long\t1\n\t.long\t1\n\t.long\t0\n\t.long\t0\n\t.long\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC3:\n\t.string\t\"\"\n\t.section\t.rodata\n\t.align 32\n.LC0:\n\t.long\t0\n\t.long\t1\n\t.long\t1\n\t.long\t1\n\t.long\t1\n\t.long\t1\n\t.long\t1\n\t.long\t0\n\t.long\t0\n\t.long\t0\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\tint a, b, N, s, f, i, flag = 0;\n\tscanf(\"%d%d\", &a, &b);\n\tscanf(\"%d\", &N);\n\tfor (i = 1; i <= N; i++) {\n\t\tscanf(\"%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\"\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){\nint n,i,a;\nlong long int max=-1000000,min=10000000,sum=0;\nscanf(\"%d\",&n);\n\tfor(i=0;i<n;i++){\n\t\tscanf(\"%d\",&a);\n\t\tif(min>...
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 %lld %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\tendbr...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%lld %lld %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...
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){ ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<math.h>\nint main()\n{\n double L,v;\n scanf(\"%lf\",&L);\n v=pow((L/3),3);\n printf(\"%.12lf\\n\",v);\n return 0;\n}\n```\n\nAs...
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\"%lf\"\n.LC2:\n\t.string\t\"%.12lf\\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\"%lf\"\n.LC2:\n\t.string\t\"%.12lf\\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\nr['~~'];n,i,s,c;main(j){for(;scanf(\"%d%d\",&n,&s)*n;printf(\"%d\\n\",c))for(c=i=0;i<n;)for(scanf(\"%d\",++i+r),j=i;--j;c+=r[i]+r[j]>s);}```\n\nAssembly Code:\n\n```assem...
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\"%d%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_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\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"%d%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include <string.h>\n#define ll long long\n#define rep(i,n) for(ll i=0;i<(n);i++)\n#define max(p,q) ((p)>(q)?(...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tpowll\n\t.type\tpowll, @function\npowll:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\ttestq\t%rsi, %rsi\n\tjle\t.L4\n\txorl\t%eax, %eax\n\tmovl\t$1, %r8d\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\taddq\t$1, %rax\n\timulq\t%rdi, %r8\n\tcmp...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tpowll\n\t.type\tpowll, @function\npowll:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\ttestq\t%rsi, %rsi\n\tjle\t.L4\n\txorl\t%eax, %eax\n\tmovl\t$1, %r8d\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\taddq\t$1, %rax\n\timulq\t%rdi, %r8\n\tcmpq\t%ra...
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 M 39999\nT[M],t[M];main(i,j,k,L,r){\nfor(i=2;i<M;i++)if(!T[i])for(j=i*2;j<M;j+=i)T[j]=1;\nfor(i=2,j=0;i<M;i++)if(!T[i])t[j++]=i;\nfor(;scanf(\"%d\",&L),L;printf(\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n\"\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\"%d\\n\"\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>\nint main(void)\n{\n\tint n,p[1001],k,i,j,x,b;\n\tscanf(\"%d %d\",&n,&k);\n\tfor(i=0;i<n;i++){\n\tscanf(\"%d\",&p[i]);\n\t}\n\tfor(i=0;i<n-1;i++){\n\t\t...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_s...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startpr...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void) {\n int a;\n char s[10];\n scanf(\"%d\",&a);\n scanf(\"%s\",&s);\n\n if(a >= 3200){\n printf(\"%s\\n\",s);\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"red\"\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\"%s\"\n.LC2:\n\t.string\t\"red\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(){\n int n, a[100000]={0};\n scanf(\"%d\", &n);\n for(int i=0; i<n; i++){\n scanf(\"%d\", &a[i]);\n a[i]--;\n }\n int cnt=1, idx=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\"\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.LFB23:\n\t.cfi_star...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%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.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\nlong long t[21][2],a,d;main(b){scanf(\"%d%d\",&a,&b),t[b][a&1]=1;for(;(d%=21)||--a-1&&scanf(\"%d\",&b);t[d++][a&1]=((b>d?0:t[d-b][!(a&1)])+((b<(21-d))?t[b+d][!(a&1)]: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%d\"\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.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\"\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.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>\nint main(void){\n int a[20000], b[20000], dummy;\n char op;\n int i, x[20000], sum = 0;\n\n for(i = 0; i < 20000; i++){\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 %c %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 %c %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\n#include <stdio.h>\n\nint main()\n{ int n,k;\n scanf(\"%d%d\",&n,&k);\n if(k==1){\n printf(\"0\");\n return 0;\n }\n n-=k;\n printf(\"%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\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %r...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void)\n{\n\tint a, b ,c ,d ,ans;\n\tscanf(\"%d%d%d\" ,&a ,&b ,&d);\n\tfor(c = a;c <= b;c++)\n\t{\n\t\tif(d%c == 0)ans++;\n\t}\n\tprintf(\"%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\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpu...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n// https://atcoder.jp/contests/abc110/tasks/abc110_a\n\n\n#include<stdio.h> //AA06( 31/ 07/ 20) If u see my code, Have a Good Day! (^_^)\n\nint main()\n{\n int A[3...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r14\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n// Aizu Vol-5 0517: Longest Steps\n// 2017.8.30 bal4u@uu\n\n#include <stdio.h>\n#include <string.h>\n\nchar c[100005];\n\nint main()\n{\n\tint n, k, a;\n\tint i, f, w, w0...
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\"%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.LFB35:\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\"%d\\n\"\n.LC2:\n\t.string\t\"%d%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\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<stdlib.h>\n#include<stdio.h>\n\nint main(){\n long s[200000],N,i,j,k,ans,bear,snuke;\n\n scanf(\"%ld\",&N);\n for(i=0;i<N;i++){\n scanf(\"%ld\",&s[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\"%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.LFB39:\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.LFB39:\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#include<string.h>\nint main(){\n\tint x;\n\tchar a[25];\n\t\n\tscanf(\"%s\", a);\n\tx=strlen(a);\n\t\n\tfor(int i=0; i<x; i++){\n\t\tif (a[i]==',')pri...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n long n,m;\n scanf(\"%ld%ld\",&n,&m);\n n-=(n>1?2:0);\n m-=(m>1?2:0);\n printf(\"%ld\\n\",n*m);\n return 0;\n}\n```\n\nAssembly Code...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%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#include <stdio.h>\n\nint main(void)\n{\n int E, Y;\n \n scanf(\"%d%d\", &E, &Y);\n \n switch (E){\n case 0:\n if (Y <= 1911){\n pri...
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\"M%d\\n\"\n.LC2:\n\t.string\t\"T%d\\n\"\n.LC3:\n\t.string\t\"S%d\\n\"\n.LC4:\n\t.string\t\"H%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\"M%d\\n\"\n.LC2:\n\t.string\t\"T%d\\n\"\n.LC3:\n\t.string\t\"S%d\\n\"\n.LC4:\n\t.string\t\"H%d\\n\"\n.LC5:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@pro...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main() {\n int a,b;\n scanf(\"%d %d\",&a,&b);\n if(a<b) {\n for(int i=0;i<b;i++) {\n printf(\"%d\",a);\n }\n }else if(a>b) {\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\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%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\...
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\", &a);\n if(a%2==0) printf(\"%d\\n\", a);\n else printf(\"%d\\n\", 2*a);\n}\n```\n\nAssembly Code:\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\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){\n int time, D, L;\n\n scanf(\"%d\", &D);\n scanf(\"%d\", &L);\n\n time = (D / L) + (D % L);\n\n printf(\"%d\\n\", time);\n\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\n\tint i,j,k,l,m,p,r;\n\tscanf(\"%d\",&r);\n\tscanf(\"%d\",&m);\n\tscanf(\"%d\",&l);\n\tfor(i=1;i<=10;i++)\n\t{\n\t\tl=l*r-m;\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\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void){\n\tint n,sum;\n\tchar str[1000];\n\n\tfor( ; ; ){\n\t\tsum=1150;\n\t\tfgets(str,sizeof(str),stdin);\n\t\tsscanf(str,\"%d\",&n);\n\t\ti...
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>\nint main(void){\n int x[9<<14];\n int i=0;\n int j=0;\n int min=9<<25;\n \n for(;~scanf(\"%d\",x+i);i++);\n for(j=1;j<x[0]-x[1]+2...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%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%r15\n\t.cfi_def_cfa_offset ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\n\t.cfi_def_cfa_offset 16\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<stdlib.h>\n\n#define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf(\"not enough memory\\n\");exit(1);};}\n//pの型の変数n個の要素分のメモリを確保し、そのアド...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tasc\n\t.type\tasc, @function\nasc:\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\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tasc\n\t.type\tasc, @function\nasc:\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\tasc, ...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h> // printf(), scanf()\n\nint\nmain(int argc, char **argv)\n{\n\tint n;\n\tscanf(\"%d\", &n);\n\tfor (int i = 1; i <= n; ++i)\n\t{\n\t\tint 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\"\n.LC1:\n\t.string\t\"Case %d:\\n\"\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...
{ "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\"Case %d:\\n\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_s...
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(int argc, char *args[])\n{\n char s[10];\n scanf(\"%s\", s);\n //文字列の長さを調べる\n int n;\n n = strlen(s);\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\"%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%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\nint main(void)\n{\n int x,y;\n scanf(\"%d%d\",&x,&y);\n printf(\"%d\\n\",x+y/2);\n return 0;\n}\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\"%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\n\nint main (){\n long long N;\n long long arr[100005];\n long long Max = 0;\n long long money;\n scanf(\"%lld\", ...
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\tpu...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n.LC1:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n\tint a,b;\n\tscanf(\"%d%d\",&a,&b);\n\tlong long x=0,y=0;\n\tfor(int i=0;i<a;i++){\n\t\tint t;\n\t\tscanf(\"%d\",&t);\n\t\tx+=t;\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.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.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\"\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.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<math.h>\nint check(int k) {\n\tint i = 1;\n\twhile (1) {\n\t\tif ((k * i) % 360 == 0) {\n\t\t\treturn i;\n\t\t}\n\t\ti++;\n\t}\n\treturn -1;\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcheck\n\t.type\tcheck, @function\ncheck:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\timull\t$-1527099483, %edi, %eax\n\tleal\t(%rdi,%rdi), %edx\n\tmovl\t$1, %r8d\n\taddl\t$47721856, %eax\n\trorl\t$3, %eax\n\tcmpl\t$11930464, %eax\n\tjb...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcheck\n\t.type\tcheck, @function\ncheck:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\timull\t$-1527099483, %edi, %eax\n\tleal\t(%rdi,%rdi), %edx\n\tmovl\t$1, %r8d\n\taddl\t$47721856, %eax\n\trorl\t$3, %eax\n\tcmpl\t$11930464, %eax\n\tjbe\t.L1...
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 <unistd.h>\n#include <string.h>\n\nint\t\tmain(void)\n{\n\tint h,w;\n\tscanf(\"%d%d\", &h,&w);\n\tchar str[h + 1][w + 1];\n\tint i;\n\n\ti = ...
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\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB47:\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%d\"\n.LC1:\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.LFB47:\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#include <stdio.h>\n#include <string.h>\n\nint main(int argc, char* argv[]){\n char str[1024];\n int tmp;\n scanf(\"%s\", str);\n if(str[(tmp=strlen(str))-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\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<string.h>\n#include<stdlib.h>\n#include<math.h>\nint main(void){\n int n,tmp,sum=0;\n scanf(\"%d\",&n);\n int l[2*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\\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\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.LFB51:\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\nint main(void)\n{\n\tint i,n,k,q,s;\n\t\n\tscanf(\"%d%d%d\",&n,&k,&q);\n\t\n\tint a[n+1];\n\t\n\tfor(i=1;i<=n;i++)\n\t\ta[i]=k-q;\n\t\n\tfor(i=0;i<q;...
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\"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\...
{ "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\"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#include<string.h>\nint main(){\n char moji[200],moji2[100], ao[100];\n \n int a,b,c;\n scanf(\"%s\",&moji);\n scanf(\"%s\",&ao);\n strc...
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\nint main(void){\n\n int n,k,x,y,sum;\n\n scanf(\"%d\\n%d\\n%d\\n%d/n\",&n,&k,&x,&y);\n\n if(n<=k){\n\n sum = x*n;\n\n }else{\n\n sum = x*k...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n%d\\n%d\\n%d/n\"\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\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%d\\n%d\\n%d/n\"\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\tendbr6...
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(c){for(;~scanf(\"%d\",&c)*c;printf(\"3C%02d\\n\",c%39?:39));}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@...
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\"3C%02d\\n\"\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\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\"3C%02d\\n\"\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%r...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <stdlib.h>\n#include <limits.h>\n#include <stdbool.h>\n\n#define rep(i, n) for(int i=0; i<(n); ++i)\n...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tup_comp\n\t.type\tup_comp, @function\nup_comp:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.size\tup_comp, .-up_comp\n\t.p2align 4\n\t.globl\tdown_comp\n\t.typ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tup_comp\n\t.type\tup_comp, @function\nup_comp:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.size\tup_comp, .-up_comp\n\t.p2align 4\n\t.globl\tdown_comp\n\t.type\tdow...
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\t\n\tint L, R, d, count = 0;\n\tscanf(\"%d %d %d\", &L, &R, &d);\n\t\n\tfor (int i=L; i<=R; i++){\n\t\tif (i % d == 0){\n\t\t\tcount++...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(void){\n int n,ans;\n scanf(\"%d\",&n);\n for(int i = (int)((n - 1) /1.08);;i++){\n if((int)(i * 1.08)==n){\n printf(\"%d\\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.LC2:\n\t.string\t\"%d\\n\"\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.LFB23:\n\t.cfi_star...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\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.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 int A, P, N;\n scanf(\"%d %d\", &A, &P);\n N = (A*3 + P)/2;\n printf(\"%d\\n\", N);\n return 0;\n}\n \n```\n\nAssembly Cod...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<string.h>\n\nint main(){\n char s[1000];\n scanf(\"%s\",s);\n \n int n;\n n=strlen(s);\n int count=0;\n for(int i=0;i<n;i++){\n if(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\"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 <string.h>\nint main() {\n\tchar s[100010] = {};\n\tint ans, len, t;\n\tscanf(\"%s\", s);\n\tlen = strlen(s);\n\tans = len;\n\tfor (int 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\"%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\nmain(g,r){scanf(\"%d%d\",&r,&g);printf(\"%d\",g*2-r);}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\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.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$2...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rs...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<string.h>\n\nint main(){\n\n\tint H,W = 0;\n\tscanf(\"%d %d\",&H,&W);\n\n\tchar\tC[2*H][W];\n\n\tfor(int i=0; i<H; i ++){\n\t\tscanf(\"%s\",C[...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\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\...
{ "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\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\nint main(){\n long long x;\n scanf(\"%lld\",&x);\n \n for(long long a=0;a>=0;a++){\n if(a<64){\n for(long long b=-64;b<=a;b++){\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 %lld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n.LC1:\n\t.string\t\"%lld %lld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void){\n\n char n[4];\n scanf(\"%s\", n);\n for (int i = 0; i < 3; i++) {\n if (n[i] == '1') {\n printf(\"9\");\n } else {\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#define N 100000\nint a[N+1];\nint dp[N+1];\n\nint min(int a, int b){\n if(b>a)return a;\n else return b;\n}\nint abs(int a){\n if(a<0)return -1*a;...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tmin\n\t.type\tmin, @function\nmin:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%edi, %esi\n\tmovl\t%edi, %eax\n\tcmovle\t%esi, %eax\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tmin, .-min\n\t.p2align 4\n\t.globl\tabs\n\t.type\tabs, ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tmin\n\t.type\tmin, @function\nmin:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%edi, %esi\n\tmovl\t%edi, %eax\n\tcmovle\t%esi, %eax\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tmin, .-min\n\t.p2align 4\n\t.globl\tabs\n\t.type\tabs, @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>\nint main(void){\n // Your code here!\n int N[10] = {0,0,0,0,0,0,0,0,0,0},P;\n for(int i = 0; i < 4; i++)\n {\n scanf(\"%d\",&P);\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\"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#include <stdio.h>\n\nint main() {\n\n int a=0,b=0;\n\n while(scanf(\"%d %d\",&a,&b)!=EOF) {\n printf(\"%d\\n\",a+b);\n }\n\n return 0;\n}\n/*\n aaaaaaaaaaaaaaaaa...
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\n#include<stdio.h>\nint main()\n{\n\tint a, b, c, d, e, f = 0, g = 0, h = 0;\n\tscanf(\"%d %d %d %d %d\", &a, &b, &c, &d, &e);\n\tif (a<0) {\n\t\tf = (a*-1)*c + d + b*e;\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 %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void){\n int n,m,i,j,total,max,s[1000];\n while(1){\n total=0;\n max=0;\n scanf(\"%d\",&n);\n scanf(\"%d\",&...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"NONE\"\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\"\n.LC1:\n\t.string\t\"NONE\"\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 n,k,i,m=1e9+7;\nlong a[200001]={},r=0;\nint main(){\n scanf(\"%d%d\",&n,&k);\n for(i=1;i<=n+1;i++)a[i]=(a[i-1]+i)%m;\n for(i=k;i<=n+1;i++)...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%ld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleaq\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\"%ld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC0(%...
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 S_MAX 10000\n\nchar s[S_MAX + 1];\n\nvoid solve(const int l){\n\tint j = 0, i = 0;\n\tint n = 1;\n\twhile(n + 1 < l){\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%d\\n\"\n\t.text\n\t.p2align 4\n\t.globl\tsolve\n\t.type\tsolve, @function\nsolve:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t$2, %edi\n\tjle\t.L6\n\tleaq\ts(%rip), %rax\n\tleal\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%d\\n\"\n\t.text\n\t.p2align 4\n\t.globl\tsolve\n\t.type\tsolve, @function\nsolve:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t$2, %edi\n\tjle\t.L6\n\tleaq\ts(%rip), %rax\n\tleal\t-3(%rd...
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(void) {\n\tint i;\n\tint p_a, p_z;\n\tint length;\n\tchar string[262144];\n\n\tfgets(string, sizeof(...
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.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbx\n\t.cfi_def_cfa_offs...
{ "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.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 16\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void){\n\tint n;\n\tlong long sum = 0;\n\tint i;\n\tint money;\n\tscanf(\"%d\",&n);\n\tfor(i = 0;i < n ;i++){\n\t\tscanf(\"%d\",&money);\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.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 <ctype.h>\n#include <limits.h>\n#include <math.h>\n#include <stdbool.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\nstatic bool compare(cons...
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.LFB54:\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.LFB54:\n\t.cfi_startproc\n\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(void)\n{\n\tint a,b,c;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\tif (a >= c) {\n\t\tprintf(\"0\\n\");\n\t}\n\telse if (a + b < c) {\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 %d %d\"\n.LC1:\n\t.string\t\"0\"\n.LC2:\n\t.string\t\"NA\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @functi...
{ "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\"0\"\n.LC2:\n\t.string\t\"NA\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nma...
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 N, i, f;\n char S;\n scanf(\"%d\", &N);\n f = 0;\n for(i = 1; i <= N; i++){\n scanf(\" %c\", &S); //%cの前の空白...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\" %c\"\n.LC2:\n\t.string\t\"Four\"\n.LC3:\n\t.string\t\"Three\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function...
{ "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\" %c\"\n.LC2:\n\t.string\t\"Four\"\n.LC3:\n\t.string\t\"Three\"\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>\nint main(){\n\tint a[4],b[4],x=0,y=0,i;\n\tfor(i=0;i<4;i++){\n\t\tscanf(\"%d\",&a[i]);\n\t\tx=x+a[i];\n\t}\n\tfor(i=0;i<4;i++){\n\t\tscanf(\"%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%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#define Z(C)if(m>a[C])m=a[C];\nint a[256];main(c,m){for(;~(c=getchar());a[c]++);m=a[75];Z(85)Z(80)Z(67)printf(\"%d\\n\",m);exit(0);}```\n\nAssembly Code:\n\n```assembly\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.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%rbx\n\t.cfi_def_cfa_offse...
{ "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.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%rbx\n\t.cfi_def_cfa_offset 16\n...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n\nint i,j;\n\nint min (int x,int y)\n{\n int k;\n if(x>y)\n {\n k=y;\n }else{\n k=x;...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tmin\n\t.type\tmin, @function\nmin:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovle\t%edi, %eax\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.size\tmin, .-min\n\t.section\t.rodata.str1.1,\"aMS\",@progbit...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tmin\n\t.type\tmin, @function\nmin:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovle\t%edi, %eax\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.size\tmin, .-min\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n....
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n\tint a, b, c, d;\n\tint p;\n\tint com_x, com_y;\n\t\n\tscanf(\"%d %d %d %d %d\", &a, &b, &c, &d, &p);\n\t\n\tcom_x = a * p;\n\t\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#define g getchar()%2\nmain(){printf(\"%d00\",7+g+g+g);}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d00\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\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\"%d00\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 16\n\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n\tint n,a,b;\n\tscanf(\"%d%d%d\",&n,&a,&b);\n\tif(n*a<b) printf(\"%d\\n\",n*a);\n\telse printf(\"%d\\n\",b);\n\treturn 0;\n}\n\n`...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\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>\n// route[i][0]はs>eの際に参照する(0へ向かう)\n// route[1][1]はs<eの際に参照する\nint route[10][2] = {\n {1,1}, //0\n {0,2}, //1\n {1,3}, //2\n {2,4}, //3\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 %d\"\n.LC2:\n\t.string\t\"%d \"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @functio...
{ "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.LC2:\n\t.string\t\"%d \"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmai...
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 a,b,c;\n\nint main() {\n scanf(\"%d %d %d\",&a,&b,&c);\n if(a!=b&a!=c)\n {printf(\"%d\",a);}\n \n if(b!=a&b!=c)\n {printf(\"%d\",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 %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$8,...
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\nchar*z,a[2][204];n,m,i,p;main(c){for(;m=scanf(\"%d %[^\\n] %[^\\n]\",&n,a,a+1)*n;printf(m>n?\"NA\\n\":\"%d\\n\",m))for(i=2;i--;m=c)for(c=p=0;z=p+p+a[c+i&1],c<m&&*z>49|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\"NA\\n\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"%d %[^\\n] %[^\\n]\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\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\"NA\\n\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"%d %[^\\n] %[^\\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:\...
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;main(a){for(;j=!puts(\"98 99\"-!!i),i<98;)for(i++%49||scanf(\"%d\",&a);j<99;)putchar((~i*++j%2&&a-->1)^i>47?46:35);}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"t...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"98 99\"\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\"%d\"\n.LC1:\n\t.string\t\"98 99\"\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%r12\n...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(void)\n{\n int a,b,k;\n scanf(\"%d%d%d\",&a,&b,&k);\n\n int i,c[100],j=0;\n for(i=1;(i<=a)||(i<=b);i++)\n if((a%i==0)&&(b%i==0)){\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%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>\n\nint main(void)\n{\n int n,i,d1,d2,p,max,ans;\n\n while(scanf(\"%d\",&n),n){\n max=0;\n ans=0;\n for(i=0;i<n;i++){\n ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%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.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%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.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\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\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\"\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>\n\nint main(void){\n\tint i;\n\tchar s[12];\n\tscanf(\"%d\", &i);\n\tscanf(\"%s\", s);\n\tif(i >= 3200)\n\t\tprintf(\"%s\\n\", s);\n\telse\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\"%s\"\n.LC2:\n\t.string\t\"red\"\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\"%s\"\n.LC2:\n\t.string\t\"red\"\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#include<string.h>\n\nint main(void)\n{\n\tint i,JOI,IOI;\n\tchar st[10000];\n\t\n\twhile(scanf(\"%s\",st)!=EOF)\n\t{\n\t\tJOI=0;\n\t\tIOI=0;\n\t\tfor(...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n%d\\n\"\n.LC1:\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\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%d\\n\"\n.LC1:\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...
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 <stdint.h>\n\nint main(void) {\n int64_t N, M;\n scanf(\"%ld %ld\", &N, &M);\n\n if(N >= (M/2)) {\n printf(\"%ld\\n\", M/2);\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\"%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\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\"%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#include <stdio.h>\nint main(void){\n\tint w, a, b;\n\tscanf(\"%d %d %d\", &w, &a, &b);\n\tint c = a < b ? a : b, d = a < b ? b : a;\n\tprintf(\"%d\", w+c < d ? d-w-c : 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 %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void) {\n\n int sx,sy,tx,ty;\n scanf(\"%d %d %d %d\", &sx, &sy, &tx, &ty);\n for (int i = sy; i < ty; i++) {\n printf(\"%c\", 'U');\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\"%c%c\"\n.LC2:\n\t.string\t\"U\"\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 %d %d %d\"\n.LC1:\n\t.string\t\"%c%c\"\n.LC2:\n\t.string\t\"U\"\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\nmain(n,a,b){scanf(\"%d%d%d\",&n,&a,&b);puts((b-a)%2?\"Borys\":\"Alice\");}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.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\"Borys\"\n.LC1:\n\t.string\t\"Alice\"\n.LC2:\n\t.string\t\"%d%d%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.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\"Borys\"\n.LC1:\n\t.string\t\"Alice\"\n.LC2:\n\t.string\t\"%d%d%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_star...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main ()\n{\n int A,B;\n scanf (\"%d %d\",&A,&B);\n if (A>=1&&A<=20&&B>=1&&B<=20)\n {\n if (A>=1&&A<=9&&B>=1&&B<=9)\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\"\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.LFB23:\n\t.cfi_s...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\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.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>\nint main(void){\n \n int n[4];\n \n scanf( \"%d %d %d %d\", &n[0], &n[1], &n[2], &n[3] );\n \n if( n[0] == 1 || n[0] == 9 || n[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 %d %d %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.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 %d %d %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_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 int n, x0, y0, x1, y1, x2, y2, x3, y3;\n scanf(\"%d\", &n);\n while(n--) {\n scanf(\"%d%d%d%d%d%d%d%d\", &x0, &y0, &x...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d%d%d%d%d%d%d%d\"\n.LC2:\n\t.string\t\"2\"\n.LC3:\n\t.string\t\"1\"\n.LC4:\n\t.string\t\"0\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d%d%d%d%d%d%d%d\"\n.LC2:\n\t.string\t\"2\"\n.LC3:\n\t.string\t\"1\"\n.LC4:\n\t.string\t\"0\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\...
train
[ { "content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<stdlib.h>\n#include<string.h>\n#include<math.h>\n\ntypedef long long ll;\n\nint max(int a, int b){\n if(a > b) return a;\n else return b;\n}...
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%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovge\t%edi, %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%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovge\t%edi, %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\nchar str[101];\nint main(void){\n scanf(\"AtCoder %s Contest\", &str[0]);\n char x = str[0];\n printf(\"A%cC\\n\",x);\n return 0;\n}```\...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"AtCoder %s Contest\"\n.LC1:\n\t.string\t\"A%cC\\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\...
{ "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\"AtCoder %s Contest\"\n.LC1:\n\t.string\t\"A%cC\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr...
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;\n scanf(\"%d\" , &A);\n scanf(\"%d\" , &B);\n scanf(\"%d\" , &C);\n if(A <= C){\n if(C <= B){\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\"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\...