data_source stringclasses 1
value | prompt listlengths 1 1 | ability stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(){\n int a, b, c, i, sum1 = 0, sum2 = 0, A = 0, x = -1 ;\n \n scanf(\"%d %d %d\", &a, &b, &c);\n \n\n while(sum1<=60*60){\n if(sum2... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"-1\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cf... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"-1\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n int n,i;\n int t,x,y,flag=0;\n \n scanf(\"%d\",&n);\n for(i=0;i<n;i++){\n scanf(\"%d %d %d\",&t,&x,&y);\n \n if(t%2!=(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\"\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, @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 %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\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>\nint main(){\n\tint a, b, d, r;\n\tdouble f;\n\tscanf(\"%d %d\", &a, &b);\n\td = a / b;\n\tr = a % b;\n\tf = (double)a / b;\n\tprintf(\"%d %d %f\\n\", d... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d %d %f\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d %d %f\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int n,h,a=0,r=1,i,s[200010]={};\n scanf(\"%d\",&n);\n while(n--){\n scanf(\"%d\",&h);\n while(s[r-1]>=h){\n r--;\n if(... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r14\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main()\n{\n\tint n, taro_p = 0, hana_p = 0;\n\tchar taro[105], hana[105];\n\t\n\tscanf(\"%d\", &n);\n\n\tfor (int i = 0; i < n; i++)\n\t{\n\t\tsc... | code | {
"ground_truth": "```assembly\n\t.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 %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\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"%d %d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_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 <malloc.h>\n#include <math.h>\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n\n//ABC114A\nint main(void) {\n int n, k, i, cou=0, tmp;\n scanf(\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"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.LFB51:\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.LFB51:\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\ni;k;main(n){\n \n \n int c[501],f[500],s[500];\n for(scanf(\"%d\",&n);k<n-1;k++)scanf(\"%d%d%d\",&c[k],&s[k],&f[k]);\n \n for(i=... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d%d%d\"\n.LC2:\n\t.string\t\"0\"\n.LC6:\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... | {
"answer": "```assembly\n\t.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\"\n.LC2:\n\t.string\t\"0\"\n.LC6:\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... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(void)\n{\n long long min=10000;\n long long l,r;\n scanf(\"%lld %lld\",&l,&r);\n\n\n for(long long i=l;i<r;i++){\n for(long long j=l+... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld %lld\"\n.LC1:\n\t.string\t\"0\"\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.... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld %lld\"\n.LC1:\n\t.string\t\"0\"\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_st... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void) {\n\n int n;\n scanf(\"%d\", &n);\n char s[n+1];\n scanf(\"%s\", s);\n int left = 0;\n int right = 0;\n int dif = 0;\n for (i... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%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.LFB23:\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\"%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.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\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.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"not enough memory\"\n.LC2:\n\t.string\t\"%ld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"not enough memory\"\n.LC2:\n\t.string\t\"%ld\\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\... |
train | [
{
"content": "Given 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\n\nint after_tax(int value, int tax) {\n return value * (100 + tax) / 100;\n}\n\nint main(int argc, char *ar... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tafter_tax\n\t.type\tafter_tax, @function\nafter_tax:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\taddl\t$100, %esi\n\timull\t%edi, %esi\n\tmovslq\t%esi, %rax\n\tsarl\t$31, %esi\n\timulq\t$1374389535, %rax, %rax\n\tsarq\t$37, %rax\n\tsub... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tafter_tax\n\t.type\tafter_tax, @function\nafter_tax:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\taddl\t$100, %esi\n\timull\t%edi, %esi\n\tmovslq\t%esi, %rax\n\tsarl\t$31, %esi\n\timulq\t$1374389535, %rax, %rax\n\tsarq\t$37, %rax\n\tsubl\t%es... |
train | [
{
"content": "Given 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 i,joi=0,ioi=0;\n char word[10000],same[4]={};\n\n while(scanf(\"%s\",word) != EOF){\n \n ioi=joi=0;\n\n for(i = 0; wor... | code | {
"ground_truth": "```assembly\n\t.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.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tp... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n%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.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int H,N;\n scanf(\"%d %d\",&H,&N);\n int a[N];\n for(int i=0;i<N;i++){\n scanf(\"%d\",&a[i]);\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.LC2:\n\t.string\t\"Yes\"\n.LC3:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\n... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"Yes\"\n.LC3:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main()\n{\n int a,b;\n scanf(\"%d%d\",&a,&b);\n int i;\n i = b - a + 1;\n while (i < b + a)\n {\n printf(\"%d \",i);\n i++;\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\t.section\t.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>\n\nint main(void)\n{\n int x[5];\n for(int i=0;i<5;i++){\n scanf(\"%d\", &x[i]);\n }\n\n for(int i=0;i<5;i++){\n if(x[i]==0) printf(\"%d\\n\",... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r12\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n int x,a,b;\n scanf(\"%d %d %d\",&x,&a,&b);\n \n if(a>=b){\n printf(\"delicious\");\n } else if(a<b && (b-a)<=x){\n printf(\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"delicious\"\n.LC2:\n\t.string\t\"safe\"\n.LC3:\n\t.string\t\"dangerous\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"delicious\"\n.LC2:\n\t.string\t\"safe\"\n.LC3:\n\t.string\t\"dangerous\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain,... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <limits.h>\n#include <stdint.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include <unistd.h>\n#include <math.h>\n\n#defi... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcomp\n\t.type\tcomp, @function\ncomp:\n.LFB63:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE63:\n\t.size\tcomp, .-comp\n\t.p2align 4\n\t.globl\tgcd2\n\t.type\tgcd2, @function\n... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcomp\n\t.type\tcomp, @function\ncomp:\n.LFB63:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE63:\n\t.size\tcomp, .-comp\n\t.p2align 4\n\t.globl\tgcd2\n\t.type\tgcd2, @function\ngcd2:\... |
train | [
{
"content": "Given 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,j,n,m,tg[128],sc[128]={0},w,a,b;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d\",&m);\n\tfor(i = 1;i <= m;i++){scanf(\"%d\",&tg[i]);}... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint sort(int a[], int n) {\n int i, j, k = 0, t;\n for (i = 0; i < n; i++) {\n for (j = n - 1; j > i; j--) {\n if (a[j] < a[j-1]) {\n\tt =... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tsort\n\t.type\tsort, @function\nsort:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %r10d\n\ttestl\t%esi, %esi\n\tjle\t.L8\n\tsubl\t$1, %r10d\n\tje\t.L1\n\txorl\t%r9d, %r9d\n\txorl\t%r8d, %r8d\n\tmovslq\t%r10d, %rsi\n\t.p2ali... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tsort\n\t.type\tsort, @function\nsort:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %r10d\n\ttestl\t%esi, %esi\n\tjle\t.L8\n\tsubl\t$1, %r10d\n\tje\t.L1\n\txorl\t%r9d, %r9d\n\txorl\t%r8d, %r8d\n\tmovslq\t%r10d, %rsi\n\t.p2align 4,,... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(){\n\tint H;\n\tint A;\n\tint total;\n\tscanf (\"%d %d\",&H,&A);\n\ttotal = H/A;\n\tif (H%A==0){\n\t\tprintf(\"%d\",total);\n\t}\n\telse{\n\t... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n int X,t;\n scanf(\"%d %d\",&X,&t);\n printf(\"%d\\n\",X>=t ? X-t:0);\n return 0;\n}```\n\nAssembly Code:\n\n```assembly\n\t.file\t... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint is_palindrome(char s[], int l)\n{\n\tint i;\n\tfor (i = 0; i < l / 2; i++) if (s[i] != s[l-1-i]) break;\n\tif (i < l / 2) return 0;\n\telse retu... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tis_palindrome\n\t.type\tis_palindrome, @function\nis_palindrome:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %ecx\n\tshrl\t$31, %ecx\n\taddl\t%esi, %ecx\n\tsarl\t%ecx\n\tcmpl\t$1, %esi\n\tjle\t.L4\n\tleal\t-1(%rsi), %eax\n\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tis_palindrome\n\t.type\tis_palindrome, @function\nis_palindrome:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %ecx\n\tshrl\t$31, %ecx\n\taddl\t%esi, %ecx\n\tsarl\t%ecx\n\tcmpl\t$1, %esi\n\tjle\t.L4\n\tleal\t-1(%rsi), %eax\n\txorl\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\nint main(void){\n char S[100001];\n int i, j, n, Ans;\n scanf(\"%s\",S);\n j = S[0];\n n = strlen(S);\n Ans = 0... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%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 p, m, c;\n \n scanf(\"%d%d%d\", &p, &m, &c);\n \n printf(\"%d\\n\", p + m + c);\n \n return (0);\n}\n``... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%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()\n{\n int n;\n\n scanf(\"%d\",&n);\n\n printf(\"%d\\n\",800*n-n/15*200);\n\n return 0;\n}\n```\n\nAssembly Code:\n\n```assembly\n\t.file\t\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void) {\n\tint H, W;\n\tchar S[64][64] = {{0}};\n\tint i, j, k, l;\n\tif (scanf(\"%d%d\", &H, &W) != 2) return 1;\n\tfor (i = 1; i <= H; 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\"%62s\"\n\t.section\t.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\"%62s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdint.h>\n#include <math.h>\n#include <time.h>\n\ntypedef int32_t i32;\ntypedef int64_t i64;\ntyp... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lli%*c\"\n.LC1:\n\t.string\t\"%lli\\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\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lli%*c\"\n.LC1:\n\t.string\t\"%lli\\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... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main()\n{\n int n, i, count = 0, real_count = 0;\n long long int data, prev = 0;\n\n scanf(\"%d\", &n);\n\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\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <math.h>\n#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);\n#define MAX(a,b) (((a)>(b))?(a):(b... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcomp\n\t.type\tcomp, @function\ncomp:\n.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\tcomp, .-comp\n\t.p2align 4\n\t.globl\tfill\n\t.type\tfill, @function\n... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcomp\n\t.type\tcomp, @function\ncomp:\n.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\tcomp, .-comp\n\t.p2align 4\n\t.globl\tfill\n\t.type\tfill, @function\nfill:\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n int main(void){ \n int N,M,i,j,A[1000],Ai,Bj,count[1000],max_count=0,max_game=-1; \n scanf(\"%d%d\",&N,&M); \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\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_st... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startpro... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n int a,s;\n\n scanf(\"%d\",&a);\ns = 180*(a-2);\nprintf(\"%d\",s);\n\nreturn 0;\n}\n```\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\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset ... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nint a,w,c,r;main(){for(;scanf(\"%d%d%d%d\",&a,&w,&c,&r),a;printf(\"%d\\n\",r>0?r:0))r=(c*w-a+r-1)/r;exit(0);}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n\"\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.LFB0:\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\"\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.LFB0:\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 0174: Badminton\n// 2017.8.9\n\n#include <stdio.h>\n#include <ctype.h>\n\nchar *gets(char *);\nchar buf[150], *p;\n\nint main()\n{\n\tint a, b, k;\n\n\twhil... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\\n\"\n\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%r13\n\t.cfi_def_cfa_o... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\\n\"\n\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%r13\n\t.cfi_def_cfa_offset ... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n\tint s = 0, t = 0;\n\tint a;\n\tint i;\n\t\n\tfor (i = 0; i < 4; i++){\n\t\tscanf(\"%d\", &a);\n\t\ts += a;\n\t}\n\tfor (i = 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\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r14\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint minof(int min, int x) {\n min = (min < x) ? min:x;\n return min;\n}\n\nint slovei(int, int);\nint slovei(int a, int b) {\n int i, j, k, l, o, ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tminof\n\t.type\tminof, @function\nminof:\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\tminof, .-minof\n\t.p2align 4\n\t.globl\tslovei\n\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tminof\n\t.type\tminof, @function\nminof:\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\tminof, .-minof\n\t.p2align 4\n\t.globl\tslovei\n\t.type... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<stdlib.h>\n#include<string.h>\n#include<math.h>\n\nint main(void){\n int n, k, s;\n int i;\n scanf(\"%d%d%d\",&n ,&k ,&s);\n f... | code | {
"ground_truth": "```assembly\n\t.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\"1 \"\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_st... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"%d \"\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.LFB51:\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(){\nint a,s,d,q;\n scanf(\"%d %d %d\",&a,&s,&d);\n for(q=0;q<s;q++){\n printf(\"%d \",d);\n }if(d>10){d--;\n for(q=a-s;q>0;q--){\n print... | code | {
"ground_truth": "```assembly\n\t.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\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\t.section\t.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\nvoid swa(int sakagutidaisuke[]) {\n\tint nakamurayuuichi = sakagutidaisuke[0];\n\tsakagutidaisuke[0] = sakagutidaisuke[1];\n\tsakagutidaisuke[1] = n... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tswa\n\t.type\tswa, @function\nswa:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\trolq\t$32, (%rdi)\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tswa, .-swa\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tswa\n\t.type\tswa, @function\nswa:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\trolq\t$32, (%rdi)\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tswa, .-swa\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n long long int a=0,b=0,c=0,Mul=0;\n scanf(\"%lld %lld.%lld\",&a,&b,&c);\n printf(\"%lld\",a*((b*100)+c)/100);\n retu... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld %lld.%lld\"\n.LC1:\n\t.string\t\"%lld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr6... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld %lld.%lld\"\n.LC1:\n\t.string\t\"%lld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\ts... |
train | [
{
"content": "Given 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 <inttypes.h>\n\nint main(void) {\n\tuint64_t N, A, B;\n\tif (scanf(\"%\" SCNu64 \"%\" SCNu64 \"%\" SCNu64, &N, &A, &B) != 3) return 1;\n\tif ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lu%lu%lu\"\n.LC1:\n\t.string\t\"0\"\n.LC2:\n\t.string\t\"%lu\\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.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\"%lu%lu%lu\"\n.LC1:\n\t.string\t\"0\"\n.LC2:\n\t.string\t\"%lu\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_sta... |
train | [
{
"content": "Given 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 char s[17];\n char a[17] = {\"CODEFESTIVAL2016\"};\n scanf(\"%s\",&s);\n int i;\n i = 0;\n int counter;\n counter = 0;\n whi... | code | {
"ground_truth": "```assembly\n\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.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.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, %rsp... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n\nint main()\n{\n int N,i;\n int *A;\n\n scanf(\"%d\",&N );\n A = calloc(N, sizeof(int));\n\n for(i=0; i<N; 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\"\n.LC1:\n\t.string\t\"DENIED\"\n.LC2:\n\t.string\t\"APPROVED\"\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.c... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"DENIED\"\n.LC2:\n\t.string\t\"APPROVED\"\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_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(void){\n\n char x,y;\n\tscanf(\"%c %c\", &x, &y);\n\tif (x < y) {\n\t\tprintf(\"<\\n\");\n\t} else if (y < x) {\n\t\tprintf(\">\\n\");\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\"%c %c\"\n.LC1:\n\t.string\t\"<\"\n.LC2:\n\t.string\t\">\"\n.LC3:\n\t.string\t\"=\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%c %c\"\n.LC1:\n\t.string\t\"<\"\n.LC2:\n\t.string\t\">\"\n.LC3:\n\t.string\t\"=\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LF... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n int i,j,N;\n int count=0;\n scanf(\"%d\", &N);\n int a[110];\n\n for(i=0;i<N;i++){\n scanf(\"%d\", &a[i]);\n ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\nint main()\n{\n int i;\n char s[200000]={};\n scanf(\"%s\",&s);\n for(i=0;i<strlen(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\"%s\"\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\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.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void) {\n\tint N, C;\n\tint i;\n\tint sumipe = 0;\n\tif (scanf(\"%d%d\", &N, &C) != 2) return 1;\n\tfor (i = 0; i < C; i++) {\n\t\tint 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%d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_st... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startpro... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n\tint n;\n\tint i;\n\tint tetra[16] = {0};\n\tint digit;\n\t\n\twhile (scanf(\"%d\", &n)){\n\t\tif (n == -1){\n\t\t\tbreak;\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\"\n\t.section\t.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\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%r14\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\nchar r[99],g[99],*G,d[99];main(c,i){for(;scanf(\"%s%s%s\",r,g,d)>1;puts(G))for(i=0,G=g,c=*G++;*(G-1);)c=c-d[i]?putchar(c),*G++:r[i++];exit(0);}```\n\nAssembly Code:\n\n``... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s%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.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\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\"%s%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.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\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()\n{\n int i,j=0;\n char a[10000];\n scanf(\"%s\",a);\n for(i=0;i<4;i++)\n {\n if(a[i]=='2')\n j++;\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.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$4096,... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint gcd(int x, int y){\n if(y == 0){\n return x;\n }\n else{\n gcd(y, x % y);\n }\n}\n\nint main(void){\n int a, b, c, temp;\n\n scanf(\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %r8d\n\ttestl\t%esi, %esi\n\tjne\t.L2\n\tjmp\t.L10\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\tmovl\t%edx, %r8d\n.L2:\n\tcltd\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %r8d\n\ttestl\t%esi, %esi\n\tjne\t.L2\n\tjmp\t.L10\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\tmovl\t%edx, %r8d\n.L2:\n\tcltd\n\tidi... |
train | [
{
"content": "Given 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 <stdbool.h>\n#include <math.h>\n\nint main(void){\n\n int N;\n\n scanf(\"%d\", &N);\n\n in... | code | {
"ground_truth": "```assembly\n\t.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.LFB51:\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.LFB51:\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{\n int a[6],i;\n for(i=1;i<6;i++)\n {\n scanf(\"%d\",&a[i]);\n if(a[i]==0)\n\n {\n printf(\"%d\",i);\n }\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r12\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%r12\n\t.cfi_def_cfa_offset 16\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n\tint N; int even = 0;\n\tint M; int odd = 0;\n\tscanf (\"%d %d\", &N, &M);\n\t\n\tfor (int i=1; i <= N; i++){\n\t\teven = even +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.LC1:\n\t.string\t\"%d %d\"\n.LC3:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d %d\"\n.LC3:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(){\n\tint n, T;\n\tint aux = 1001, temp = 0;\n\tscanf(\"%d %d\", &n, &T);\n\tint ci, ti;\n\tfor(int i = 0; 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\"TLE\"\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_... | {
"answer": "```assembly\n\t.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\"TLE\"\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_startp... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\nint a;\nscanf(\"%d\",&a);\nif(a==3||a==5||a==7)printf(\"YES\");\nelse printf(\"NO\");\nreturn 0;\n}```\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.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#include <string.h>\nint main() {\n int i, j, len, index = 0;\n char *keyence = \"keyence\", S[100], tmp[100] = {'\\0'};\n scanf(\"%s\", S);\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"keyence\"\n.LC2:\n\t.string\t\"NO\"\n.LC3:\n\t.string\t\"YES\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function... | {
"answer": "```assembly\n\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\"keyence\"\n.LC2:\n\t.string\t\"NO\"\n.LC3:\n\t.string\t\"YES\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain... |
train | [
{
"content": "Given 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 MOD 1000000007\n\nint main(void) {\n\tint n,m;\n\tlong long int ans;\n\t\n\tscanf(\"%d %d\",&n,&m);\n\t\n\tif (n > m) {\n\t\tn ^= m ^= n ^= m;... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\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\ts... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nvoid swap_str(int *a, int *b){\n int temp = *a;\n *a = *b;\n *b = temp;\n}\n\nvoid sort_str(int *s, int n){\n int i, j;\n \n for(i = 0; i < n;... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tswap_str\n\t.type\tswap_str, @function\nswap_str:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tmovl\t(%rsi), %edx\n\tmovl\t%edx, (%rdi)\n\tmovl\t%eax, (%rsi)\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tswap_str, .-sw... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tswap_str\n\t.type\tswap_str, @function\nswap_str:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tmovl\t(%rsi), %edx\n\tmovl\t%edx, (%rdi)\n\tmovl\t%eax, (%rsi)\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tswap_str, .-swap_str... |
train | [
{
"content": "Given 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 min(int a, int b){\n if(a<b)return a;\n else return b;\n}\n\nint dp[2000000];\nint DP[2000000];\n\nint main(){\n int i,j,x;\n\n for(i=1;i<=10... | 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%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovle\t%edi, %eax\n\tret\n\t.cfi_endproc\n.LFE23:\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.LFB23:\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.LFE23:\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/*\nAtCoder Grand Contest 026 A - Colorful Slimes 2\n結果:\n*/\n\n#include<stdio.h>\n#include<string.h>\n#include<math.h>\n#include<stdlib.h>\n\n#define max(x,y)(x<y?y:x)\n... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcompare\n\t.type\tcompare, @function\ncompare:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t(%rsi), %rax\n\tsubq\t(%rdi), %rax\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.size\tcompare, .-compare\n\t.section\t.rodata.str1.1,\"aMS\",@progb... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcompare\n\t.type\tcompare, @function\ncompare:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t(%rsi), %rax\n\tsubq\t(%rdi), %rax\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.size\tcompare, .-compare\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\... |
train | [
{
"content": "Given 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[51];\n\tscanf(\"%s\", s);\n\ts[strlen(s) - 8] = '\\0';\n\tprintf(\"%s\\n\", s);\n\treturn 0;\n}```\n\nAssemb... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%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 <stdbool.h>\n\nint main()\n{\n char str[200001]=\"\";\n int cot=0,p_a=0,len=0;\n bool ex_a=false;\n scanf(\"... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbx\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(void){\n long long int N,A,B;\n long long int i;\n long long int h[100000];\n long long int K;\n long long int left,right;\n long long... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld %lld %lld\"\n.LC1:\n\t.string\t\"%lld\"\n.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.LFB... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld %lld %lld\"\n.LC1:\n\t.string\t\"%lld\"\n.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\... |
train | [
{
"content": "Given 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 L,a,b,c,d,x,y,z;\n\tscanf(\"%d %d %d %d %d\",&L,&a,&b,&c,&d);\n\tx=a/c;\n\ty=b/d;\n\tif(a%c>=1){\n\t\tx=x+1;\n\t}\n\tif(b%d>=1... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main() {\n\n int h,w,x,i,j,minx,mini,minj;\n\n while(scanf(\"%d%d\",&h,&w),h){\n\n x = h*h +w*w;\n minx=100000000;\n \n for( i=1;i... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\\n\"\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\tp... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\\n\"\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... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{ int A, B, area;\n scanf(\"%d %d\", &A, &B);\n area = (A-1)*(B-1);\n printf(\"%d\", area);\n return 0;\n}\n```\n\nAssemb... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n \nint main (void)\n{\nint n,m;\nint s=0,i;\nscanf(\"%d\",&n);\nm = n;\ni = 0;\ndo\n{\ns += m%10;\nm=m/10;\ni ++;\n}while(i<10);\n \nif(n%s == 0)\np... | code | {
"ground_truth": "```assembly\n\t.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 (void){\n\t\n\tint n,point,max,min,count,sum,ave,i;\n\tfor(;;){\n\tscanf(\"%d\",&n);\n\tif(n==0)break;\n\t\tcount=1;\n\t\tsum=0;\n\t\tave=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\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n\nint main (void) {\n int n;\n scanf(\"%d\", &n);\n long int x, y, minz = 2000000000, maxz = 2, minw = 1000000000, maxw ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%ld %ld\"\n.LC2:\n\t.string\t\"%ld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB39:\n\t.cf... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%ld %ld\"\n.LC2:\n\t.string\t\"%ld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB39:\n\t.cfi_star... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main()\n{\n int x;\n\n scanf(\"%d\", &x);\n\n if (x<1200) printf(\"ABC\");\n else if (1200<=x && x<2800) printf(\"ARC\");\n else 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\"ABC\"\n.LC2:\n\t.string\t\"ARC\"\n.LC3:\n\t.string\t\"AGC\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nm... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"ABC\"\n.LC2:\n\t.string\t\"ARC\"\n.LC3:\n\t.string\t\"AGC\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void){\n\n long n;\n scanf(\"%ld\", &n);\n long k;\n scanf(\"%ld\", &k);\n double p[n];\n for (long i = 0; i < n; 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.LC1:\n\t.string\t\"%ld\"\n.LC2:\n\t.string\t\"%lf\"\n.LC6:\n\t.string\t\"%lf\\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.LC1:\n\t.string\t\"%ld\"\n.LC2:\n\t.string\t\"%lf\"\n.LC6:\n\t.string\t\"%lf\\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>\nint main(void){\n int n,i;\n scanf(\"%d\",&n);\n for(i=n;i<n+111;i++){\n if(i%111==0) break;\n }\n printf(\"%d\",i);\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\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset ... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<stdlib.h>\n#include<string.h>\n#include<math.h>\n#define ll long long int\n\nll n;\nll a[200001];\nint yoso[200001]={};\n\n\nint main(){\n sc... | code | {
"ground_truth": "```assembly\n\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.LFB51:\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.LFB51:\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 int A,B;\n scanf(\"%d %d\",&A,&B);\n if((A*B)%2==1) printf(\"Yes\\n\");\n else printf(\"No\\n\");\n return 0;\n}```\n\nAssembly 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\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_sta... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void){\n\tint n,a,b,x;\n\tscanf(\"%d %d %d\",&n,&a,&b);\n\tx=n*a;\n\tif(x<b){\n\t\tprintf(\"%d\\n\",x);\n\t}else{\n\t\tprintf(\"%d\\n\",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 %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n #include<stdio.h>\n\nint main(){\n int a,b,c,cul,count1;\n scanf(\"%d %d %d\",&a,&b,&c);\n\n cul=a*c;\n if(cul>b){\n count1 = b/a;\n printf(\"%d\",count1);\n }el... | code | {
"ground_truth": "```assembly\n\t.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 gcd(int a, int b)\n{\n if (b == 0) return a;\n return gcd(b, a % b);\n}\n\nint main(void)\n{\n int w, h, c;\n int d;\n\n scanf(\"... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %r8d\n\ttestl\t%esi, %esi\n\tjne\t.L2\n\tjmp\t.L10\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\tmovl\t%edx, %r8d\n.L2:\n\tcltd\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %r8d\n\ttestl\t%esi, %esi\n\tjne\t.L2\n\tjmp\t.L10\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\tmovl\t%edx, %r8d\n.L2:\n\tcltd\n\tidi... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint gcd(long int a, long int b)\n{\n while (a%b!=0)\n {\n long int z;\n z = a;\n a = b;\n b = z % b;\n }\n re... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tmovq\t%rsi, %rdx\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tmovq\t%rdx, %rcx\n\tcqto\n\tidivq\t%rcx\n\tmovq\t%rcx, %rax\n\ttestq\t%rdx, %r... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tgcd\n\t.type\tgcd, @function\ngcd:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tmovq\t%rsi, %rdx\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tmovq\t%rdx, %rcx\n\tcqto\n\tidivq\t%rcx\n\tmovq\t%rcx, %rax\n\ttestq\t%rdx, %rdx\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n \nint main(){\n\tint N, K;\n\t\n\tscanf(\"%d %d\", &N, &K);\n\tint A[N];\n\t\n\tint i;\n\tint x;\n\tfor(i=0; i<N; i++){\n\t\tscanf(\"%d\", &A[i]);\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\"Yes\"\n.LC3:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\n... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"Yes\"\n.LC3:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n int z, zzz, x, y, max, t;\n\n while(scanf(\"%d\", &z), z)\n {\n max = 0, zzz = z * z * z;\n\n for(x = 1; ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n\"\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\\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.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r12\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n\tint a, b;\n\tint i;\n\n\tfor (i = 0; i < 7; i++) {\n\t\tscanf(\"%d%d\", &a, &b);\n\t\tprintf(\"%d\\n\", a - b);\n\t}\n\n\tretur... | code | {
"ground_truth": "```assembly\n\t.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\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\"%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%r1... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint MIN(int a,int b){return a<b?a:b;}\nint MAX(int a,int b){return a<b?b:a;}\nint main(){\n int b[3]={0};\n int n,a;\n scanf(\"%d\",&n);\n while(n-... | 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\tMAX\n\t.type\tMAX, ... | {
"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\tMAX\n\t.type\tMAX, @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 \nint main(void){\n int n;\n int a;\n int b;\n int c;\n int d;\n scanf(\"%d\", &n);\n scanf(\"%d\", &a);\n scanf(\"%d\", &b);\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\"%s\"\n.LC2:\n\t.string\t\"No\"\n.LC3:\n\t.string\t\"Yes\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmai... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"No\"\n.LC3:\n\t.string\t\"Yes\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.L... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n char a[8], s[101], b[8];\n \n scanf(\"%s%s%s\", a, s, b);\n \n printf(\"A%cC\\n\", s[0]);\n \n return 0;\n \n}```\n\nAss... | code | {
"ground_truth": "```assembly\n\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%s\"\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\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\"%s%s%s\"\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\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/*\n * ID: 0357\n * Problem: Otoshidama\n */\n\n#include <stdio.h>\n\nint main(void)\n{\n int a, b;\n scanf(\"%d %d\", &a, &b);\n\n printf(\"%d\\n\", (a + b) / 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 %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\nint min(int a,int b){return a<b?a:b;}\nint max(int a,int b){return a>b?a:b;}\nint main(void){\n char s[100020];\n scanf(\"%... | 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.LFB35:\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.LFE35:\n\t.size\tmin, .-min\n\t.p2align 4\n\t.globl\tmax\n\t.type\tmax, ... | {
"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.LFB35:\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.LFE35:\n\t.size\tmin, .-min\n\t.p2align 4\n\t.globl\tmax\n\t.type\tmax, @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#include<stdlib.h>\nint fun(int [],int );\nint cmp(const void *,const void *);\nint cmp(const void *a,const void *b)\n{\n return *(int *)a-*(int *)b... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmp\n\t.type\tcmp, @function\ncmp:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.size\tcmp, .-cmp\n\t.p2align 4\n\t.globl\tfun\n\t.type\tfun, @function\nfun:\n.... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmp\n\t.type\tcmp, @function\ncmp:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.size\tcmp, .-cmp\n\t.p2align 4\n\t.globl\tfun\n\t.type\tfun, @function\nfun:\n.LFB40:... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nx,y,u;\np(a,b){for(;b--;)putchar(a+68);}\nmain(v){\n scanf(\"%d%d%d%d\",&u,&v,&x,&y);\n x-=u;\n y-=v;\n p(17,y);\n p(14,x+1);\n p(0,y+1);\n p(8,x+1);... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tp\n\t.type\tp, @function\np:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%esi, %esi\n\tje\t.L9\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tleal\t68(%rdi), %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 24\n\t.cf... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tp\n\t.type\tp, @function\np:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%esi, %esi\n\tje\t.L9\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tleal\t68(%rdi), %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 24\n\t.cfi_offs... |
train | [
{
"content": "Given 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\tchar C[2][4];\n\tif (scanf(\"%4s\", C[0]) != 1) return 1;\n\tif (scanf(\"%4s\", C[1]) != 1) return 1;\n\tputs(C[0][0] == C[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\"YES\"\n.LC1:\n\t.string\t\"NO\"\n.LC2:\n\t.string\t\"%4s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_start... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"YES\"\n.LC1:\n\t.string\t\"NO\"\n.LC2:\n\t.string\t\"%4s\"\n\t.section\t.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(void){\n\tint A,B,C,a;\n\tscanf(\"%d%d%d\",&A,&B,&C);\n\ta=A;\n\tA=B;\n\tB=a;\n\ta=A;\n\tA=C;\n\tC=a;\n\tprintf(\"%d %d %d\",A,B,C);\n\tretur... | code | {
"ground_truth": "```assembly\n\t.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 %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\... | {
"answer": "```assembly\n\t.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 %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\... |
train | [
{
"content": "Given 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 h, w;\n long sum;\n \n scanf(\"%ld\", &h);\n scanf(\"%ld\", &w);\n \n sum = (h * w + 1) / 2;\n \n if(h == 1L || w == 1L)... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%ld\"\n.LC1:\n\t.string\t\"%ld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpush... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%ld\"\n.LC1:\n\t.string\t\"%ld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rb... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int a,b,c;\n int coins = 0;\n scanf(\"%d%d%d\",&a,&b,&c);\n int day = 0;\n int bd =0;\n while(1){\n if (bd==7){\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsu... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$4... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void){\n int n;\n int a, aa, b, cou, min=1000000;\n scanf(\"%d\", &n);\n \n for(a=1; a<n; a++){\n cou = 0;\n 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\"\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(){\n int unused __attribute__((unused));\n int N;\n unused = scanf(\"%d\", &N);\n\n printf(\"ABC%d\",N);\n return 0;\n}```\n\nAssembly Co... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"ABC%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\"\n.LC1:\n\t.string\t\"ABC%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(){\n int n,k,q; scanf(\"%d%d%d\",&n,&k,&q);\n int a[n];\n for(int i=0; i<n; i++) a[i]=k-q;\n for(int i=0; i<q; i++){\n int t; scanf(\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%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<stdlib.h>\n#define ll long long\n#define rep(i,l,r)for(ll i=(l);i<(r);i++)\n\nll ans;\nll a[100010];\nint main(){\n\tint n;\n\tscanf(\"%d\",&n... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%lld\"\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.LFB39:\n\t.cfi_... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%lld\"\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.LFB39:\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 <string.h>\n\nint main(void)\n{\n\tchar A[100] = { 0 };\n\tchar B[100] = { 0 };\n\tchar C[100] = { 0 };\n\tint i;\n\tint count_a = 0;\n\tint ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\\n%s\\n%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%r13\n\t.cfi_def_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\"%s\\n%s\\n%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%r13\n\t.cfi_def_cfa_off... |
train | [
{
"content": "Given 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 x,x1,x2,tonnbo;\n\tscanf(\"%d %d\",&x1,&x2);\n\tif (x1>x2) printf(\"%d\\n\",x1-x2);\n\telse printf(\"%d\\n\",x2-x1);\n\treturn... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsub... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\nint main(void){\n \n char s[101];\n \n scanf(\"%s\",s);\n \n printf(\"%c\",s[0]);\n printf(\"%d\",strlen(s)-... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%c\\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_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\"%s\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%c\\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\... |
train | [
{
"content": "Given 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 float l;\n scanf(\"%f\",&l);\n \n double volume=(l/3)*(l/3)*(l/3);\n \n printf(\"%lf\",volume);\n \n return 0;\n}```\n\nAssembl... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%f\"\n.LC2:\n\t.string\t\"%lf\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$2... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%f\"\n.LC2:\n\t.string\t\"%lf\"\n\t.section\t.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, %rs... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.