data_source stringclasses 1
value | prompt listlengths 1 1 | ability stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n\nint main()\n{\n \n int i,len;\n char string[200000];\n int sum=0;\n int result=0;\n \n scanf(\"%s\",string... | code | {
"ground_truth": "```assembly\n\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#include <string.h>\nint main(void)\n{\n int l[100],a,b,d,i,j=0,k,n,p,x,y,z=0;\n char s[500],c[500];\n\n scanf(\"%d%d\",&n,&d);\n\n z=2*d+1;\n wh... | code | {
"ground_truth": "```assembly\n\t.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.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tsubq... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24,... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void)\n{\n int a,b,c;\n scanf(\"%d %d %d\",&a,&b,&c);\n if(a<b&&b<c){\n printf(\"Yes\\n\");\n }else{\n printf(\"No\\n\");\n }\n re... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startp... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\nint a, b;\nscanf(\"%d %d\", &a, &b);\nif(a == b){\nprintf(\"a == b\\n\");\n}\nelse if(a > b){\nprintf(\"a > b\\n\", a, b);\n}\nelse {\npri... | code | {
"ground_truth": "```assembly\n\t.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\"a == b\"\n.LC2:\n\t.string\t\"a > b\\n\"\n.LC3:\n\t.string\t\"a < b\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tma... | {
"answer": "```assembly\n\t.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\"a == b\"\n.LC2:\n\t.string\t\"a > b\\n\"\n.LC3:\n\t.string\t\"a < b\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @f... |
train | [
{
"content": "Given the following C 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>\nint main(void){\nint h,w;\nchar ss[10]=\"snuke\";\nchar s[30][30][10];\nscanf(\"%d %d\",&h,&w);\nfor(int cou... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"%c%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB51:\n\t.cfi_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\"%s\"\n.LC2:\n\t.string\t\"%c%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB51:\n\t.cfi_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,b,c,x,y;\n\n scanf(\"%d %d %d %d %d\", &a, &b, &c, &x, &y);\n\n int min_a = a;\n int min_b = b;\n int min_ab = a+b;\n... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int n,m;\n int i,j,rear,a,b,co;\n while(scanf(\"%d %d\",&n,&m),n||m){\n int f[501];\n char c[501]={0};\n char r[501][501]={0}... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpus... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %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%r... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void)\n{\n\tint a,p;\n\tscanf(\"%d%d\",&a,&p);\n\tp+=a*3;\n\tprintf(\"%d\\n\",p/2);\n\treturn 0;\n}```\n\nAssembly Code:\n\n```assembly\n\t.fi... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24,... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n\nint main(){\n char s[200005];\n scanf(\"%s\", s);\n int start, end;\n for(int i=0; i<strlen(s); i++)\n if(s[i] == 'A'){\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%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#include<string.h>\nint main(){\n char argv[1006];\n int argc;\n scanf(\"%s\",argv);\n argc=strlen(argv);\n if(argv[argc-1]=='s'){\n printf(\"%... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"es\"\n.LC2:\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_startpro... | {
"answer": "```assembly\n\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\"es\"\n.LC2:\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\te... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n// C - Snack\n#include <stdio.h>\ntypedef long long ll;\n\nll gcd(ll a, ll b){\n if(a%b==0) return b;\n else gcd(b, a%b);\n}\n\nint main(void){\n ll a, b;\n s... | 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#define max(p,q)((p)>(q)?(p):(q))\n\nint main(){\n\tint x,a,b,n;\n\tscanf(\"%d%d%d%d\",&x,&a,&b,&n);\n\twhile(n--){\n\t\tchar s[10];\n\t\tscanf(\" %s\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d%d\"\n.LC1:\n\t.string\t\" %s\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.c... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d%d\"\n.LC1:\n\t.string\t\" %s\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_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\n#include <stdio.h>\nint main(){\n int kazu,sum,i,j,count;\n \n while(1){\n scanf(\"%d\",&kazu);\n if(kazu==0)break;\n count=0;\n for(i=1;i<=1000;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%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#include <string.h>\nint main(int argc, char *argv[])\n{\n\tlong long a;\n\tchar b[11];\n\tscanf(\"%lld%s\",&a,b);\n\tint bb=0,cc=0,i,sum=1;\n\tfor(i=... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld%s\"\n.LC1:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld%s\"\n.LC1:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\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>\nint min(int x, int y) { return x < y ? x : y; }\nint main() {\n\tint n, m, a, x, cost1 = 0, cost2 = 0;\n\tscanf(\"%d%d%d\", &n, &m, &x);\n\tfor (int i... | 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.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%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.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n int n,i,j,k;\n int A[140000];//14万!?うせやろ?\n scanf(\"%d\",&n);\n for(i=0;i<100001;i++)A[i]=0;\n for(i=0;i<n;i++){scanf(\"%d\",&j);A[j... | code | {
"ground_truth": "```assembly\n\t.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%r13\n\t.cfi_def_cfa_offset ... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%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%r13\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 a ,b,c;\n\tscanf(\"%d %d %d\",&a,&b,&c);\n\tif(a > b ){\n\t\tif(a < c){\n\t\tprintf(\"C\\n\");\n\t\t}\n\t\telse {\n\t\tprintf(\"A... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"C\"\n.LC2:\n\t.string\t\"A\"\n.LC3:\n\t.string\t\"B\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\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 %d %d\"\n.LC1:\n\t.string\t\"C\"\n.LC2:\n\t.string\t\"A\"\n.LC3:\n\t.string\t\"B\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n... |
train | [
{
"content": "Given the following C 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\nbool hv[105];\n\nint main() {\n int n, k; scanf(\"%d %d\", &n, &k);\n for (int i = 0; i < k; i++) {... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_s... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startpr... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n\nint cmpnum(const void * n1, const void * n2)\n{\n\tif (*(long *)n1 > *(long *)n2)\n\t{\n\t\treturn 1;\n\t}\n\telse if (*(long *... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmpnum\n\t.type\tcmpnum, @function\ncmpnum:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t(%rsi), %rdx\n\tmovl\t$1, %eax\n\tcmpq\t%rdx, (%rdi)\n\tjg\t.L1\n\tsetl\t%al\n\tmovzbl\t%al, %eax\n\tnegl\t%eax\n.L1:\n\tret\n\t.cfi_endproc\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmpnum\n\t.type\tcmpnum, @function\ncmpnum:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t(%rsi), %rdx\n\tmovl\t$1, %eax\n\tcmpq\t%rdx, (%rdi)\n\tjg\t.L1\n\tsetl\t%al\n\tmovzbl\t%al, %eax\n\tnegl\t%eax\n.L1:\n\tret\n\t.cfi_endproc\n.LFE3... |
train | [
{
"content": "Given the following C 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 comp(const void *a, const void *b){\n return *(int*)a - *(int*)b;\n}\n\nint main(){\n int n;\n int i;\n int a[128];\n ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcomp\n\t.type\tcomp, @function\ncomp:\n.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\tcomp, .-comp\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcomp\n\t.type\tcomp, @function\ncomp:\n.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\tcomp, .-comp\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.stri... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n\n#include <stdio.h>\n\nint main()\n{ int x,y,ans=0;\n scanf(\"%d%d\",&x,&y);\n if(x==1){\n ans+=300000;\n }else if(x==2){\n ans+=200000;\n }e... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %r... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <math.h>\n#include <stdlib.h>\n#include <stdbool.h>\nint main(){\n int a;\n scanf(\"%d\",&a);\n \n printf(\"%d\",a/2*(a-a/2));\n ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%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.LFB39:\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\nint main(void)\n{\n int n;\n int now, min, max;\n int i, j;\n char input[2000];\n char train[1000];\n\n scanf(\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%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%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.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\n int a,b,pranto;\n scanf(\"%d%d\",&a,&b);\n pranto=a+b;\n if((pranto%3)==0||(a%3)==0||(b%3)==0)\n printf(\"Possible\"... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"Possible\"\n.LC2:\n\t.string\t\"Impossible\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"Possible\"\n.LC2:\n\t.string\t\"Impossible\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.c... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n int a,b,i,s,c;\n\n scanf(\"%d%d\",&a,&b);\n\n s=(b+a-3)/(a-1);\n\n printf(\"%d\\n\",s);\n ret... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24,... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void)\n{\nfloat a,b;\nint EOA=-1;\n\twhile(EOA!=scanf(\"%f%f\",&a,&b))\n\t{\n\tif(a<35.50&&b<71.00)\n\t{\n\t\tprintf(\"AAA\\n\");\n\t}\n\telse... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC2:\n\t.string\t\"AAA\"\n.LC5:\n\t.string\t\"AA\"\n.LC8:\n\t.string\t\"A\"\n.LC11:\n\t.string\t\"B\"\n.LC14:\n\t.string\t\"C\"\n.LC17:\n\t.string\t\"D\"\n.LC20:\n\t.string\t\"E\"\n.LC21:\n\t.string\t\"NA\"\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC2:\n\t.string\t\"AAA\"\n.LC5:\n\t.string\t\"AA\"\n.LC8:\n\t.string\t\"A\"\n.LC11:\n\t.string\t\"B\"\n.LC14:\n\t.string\t\"C\"\n.LC17:\n\t.string\t\"D\"\n.LC20:\n\t.string\t\"E\"\n.LC21:\n\t.string\t\"NA\"\n.LC22... |
train | [
{
"content": "Given the following C 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 max,min,a;\n scanf(\"%d%d\",&min,&max);\n if(max<min){\n a=min;\n min=max;\n max=a;\n }\n scanf(\"%d\",&a);\n if(a>=ma... | code | {
"ground_truth": "```assembly\n\t.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()\n{\n int n;\n int p;\n int d1, d2;\n int i, j;\n\n scanf(\"%d\", &n);\n while (n != 0) {\n int maxp = 0;\n ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d %d %d\"\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... | {
"answer": "```assembly\n\t.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\"%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... |
train | [
{
"content": "Given the following C 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 char s[100001];\n scanf(\"%s\", s);\n int length = strlen(s);\n int p_max = length/2;\n int p_count =... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.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.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbx\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n int n,x,y,i,j;\n long s;\n\n scanf(\"%d\",&n);\n\n int 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\"%ld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%ld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint cheap(int a,int b){\n if(a<=b){\n return a;\n }else{\n return b;\n }\n}\n\nint main(void){\n int n,a,b;\n scanf(\"%d %d %d\",&n,&a,&b)... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcheap\n\t.type\tcheap, @function\ncheap:\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\tcheap, .-cheap\n\t.section\t.rodata.str1.1,\"aMS\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcheap\n\t.type\tcheap, @function\ncheap:\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\tcheap, .-cheap\n\t.section\t.rodata.str1.1,\"aMS\",@pro... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void) {\n int n, p[100], c=0, i;\n \n scanf(\"%d\",&n);\n for(i=0;i<n;i++) scanf(\"%d\",&p[i]);\n \n for(i=0;i<n-2;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\nint main()\n{\n\tint A, B;\n\tscanf(\"%d %d\", &A, &B);\n\tif (A >= 13) printf(\"%d\\n\", B);\n\telse if (A >= 6) printf(\"%d\\n\", B / 2);\n\telse ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"0\"\n\t.section\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\"\n.LC2:\n\t.string\t\"0\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startpro... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n\nint main()\n{\n char s[105];\n int n,i,R,L;\n\n scanf(\"%s\",s);\n n = strlen(s);\n L = (n-1)/2;\n R = (n+3)/2;\n\n for(... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"No\"\n.LC2:\n\t.string\t\"Yes\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startp... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"No\"\n.LC2:\n\t.string\t\"Yes\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void){\n int num,i,o,sign,temp,line[100];\n for(;sign=0,scanf(\"%d\",&num),num;){\n for(i=0;i<num;i++)\n scanf(\"%d... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\nint a,b,c;\nscanf(\"%d %d\",&a,&b);\nif(a>=1 && a<=9 && b>=1 && b<=9)\nprintf(\"%d\\n\",a*b);\nelse\nprintf(\"-1\\n\");\nreturn 0;\n}```... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"-1\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_s... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"-1\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startpr... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main() {\n int a,i,sum=0;\n scanf(\"%d\",&a);\n for(i=1;i<=a;i++){\n sum+=i;\n }\n printf(\"%d\\n\",sum);\n return 0;\n}\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\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>\nvoid put(int n)\n{\n if(n==0) printf(\"A\");\n if(n==1) printf(\"B\");\n if(n==2) printf(\"C\");\n if(n==3) printf(\"D\");\n if(n==4) printf(\"E\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tput\n\t.type\tput, @function\nput:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tje\t.L14\n\tcmpl\t$1, %edi\n\tje\t.L3\n\tcmpl\t$2, %edi\n\tje\t.L15\n\tcmpl\t$3, %edi\n\tjne\t.L16\n\tmovl\t$68, %edi\n\tjmp\tputchar@P... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tput\n\t.type\tput, @function\nput:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tje\t.L14\n\tcmpl\t$1, %edi\n\tje\t.L3\n\tcmpl\t$2, %edi\n\tje\t.L15\n\tcmpl\t$3, %edi\n\tjne\t.L16\n\tmovl\t$68, %edi\n\tjmp\tputchar@PLT\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 <math.h>\n#include <string.h>\n#include <stdlib.h>\n#include <time.h>\n\n#define pai 3.1415926535\n\n\nint main(void){\n\n\tchar S[7];\n\tsca... | code | {
"ground_truth": "```assembly\n\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.LFB51:\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.LFB51:\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\n#define hash(x) (((x) - 160) / 5)\n\nint dist[6];\n\nint main(void)\n{\n\tint n;\n\tint i, j;\n\t\n\tscanf(\"%d\", &n);\n\twhile (n-- > 0){\n\t\tint... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d.%*d\"\n.LC2:\n\t.string\t\"%d:\"\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\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\"%d.%*d\"\n.LC2:\n\t.string\t\"%d:\"\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... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<string.h>\nint main()\n{\n char s1[10],s2[10],s3[10];\n int i;\n scanf(\"%s %s %s\",&s1,&s2,&s3);\n\n for(i=0;i<10;i++){\n if('a'<=s1[i] && s1[i]<... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s %s %s\"\n.LC1:\n\t.string\t\"%c%c%c\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB12:\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\"%s %s %s\"\n.LC1:\n\t.string\t\"%c%c%c\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB12:\n\t.cfi_startproc\n\tendbr64\n\tsubq\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(){\n int n,b,c,i,s;\n int min = 1000;\n int max = 0;\n int T[20];\n b = 0;\n T[b] = 0;\n while(1){\n scanf(\"%d\",&n);\n if(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\nint main()\n{\n\tint a,b;\n\tint c=0;\n\tint d=0;\n\t\n\tscanf(\"%d %d\",&a,&b);\n\tc=abs(a)-abs(b);\n\td=abs(c);\n\tif(c>0){\n\t... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB39:\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.LFB39:\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 a,b;\n while(scanf(\"%d %d\",&a,&b)!=EOF)printf(\"%d\\n\",a+b);\n return 0;\n}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"te... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n\"\n.LC1:\n\t.string\t\"%d %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpus... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n\"\n.LC1:\n\t.string\t\"%d %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n int a,b,c,d;\n scanf(\"%d%d%d%d\",&a,&b,&c,&d);\n if(a*b==c*d)printf(\"%d\\n\",c*d);\n else if(a*b>c... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n\tint q, c, n, a, s, f;\n\t\n\tscanf(\"%d\", &q);\n\twhile (q--){\n\t\tscanf(\"%d %d %d\", &c, &a, &n);\n\t\t\n\t\ts = 0;\n\t\tf ... | code | {
"ground_truth": "```assembly\n\t.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\"%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\"\n.LC1:\n\t.string\t\"%d %d %d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\n int AB,BC,CA,A;\n scanf(\"%d%d%d\",&AB,&BC,&CA);\n int a,b,c;\n a=AB*AB;\n b=BC*BC;\n c=CA*CA;\n if(a==(b+c))\n ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_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.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%... |
train | [
{
"content": "Given the following C 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(int argc, char const *argv[]) {\n int A[3];\n int B[3];\n int T[5];\n for (size_t i = 1; i < 5; i++) {T[i]=0;}\n for (size_t 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%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:\n.LFB23:\n\t.cfi_star... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%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:\n.LFB23:\n\t.cfi_startproc\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\nchar s[100000];\nint main(){\n scanf(\"%s\",s);\n int len=strlen(s);\n int c=0;\n char t=s[0];\n for(int i=0;i<len;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.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\nvoid run(void){\n char s[51];\n scanf(\"%s\",s);\n int n=0;\n while(s[n]!='\\0') n++;\n s[n-8]='\\0';\n printf(\"%s\\n\",s);\n}\n\nint main(voi... | code | {
"ground_truth": "```assembly\n\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.text\n\t.p2align 4\n\t.globl\trun\n\t.type\trun, @function\nrun:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tleaq\t.LC0... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n\t.text\n\t.p2align 4\n\t.globl\trun\n\t.type\trun, @function\nrun:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tleaq\t.LC0(%rip)... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void){\n int R, G, B, N;\n int i=0, j=0, ans=0;\n \n scanf(\"%d %d %d %d\",&R ,&G, &B, &N);\n \n for(i=0; i <= N/R; i++){\n for(j=... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nc,n,t;main(x){for(;t=scanf(\"%d%*d \",&n),n;printf(\"%d\\n\",c))for(c=0;x=getchar()%5;++t)t=x-4?t%2?c+=t>2*n,t:1:t%2?0:t;}```\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\"\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.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpus... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%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.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nc,t,d[4010]={1};char s[4010];i;main(j){for(gets(s);s[i/2];d[j]=0,i++)for(j=c+=s[i]?t+=2,s[i]-48:0;j>i+c-t&&~j;j--)d[j]=(d[j]+d[j-1])%998244353;printf(\"%d\",d[c]);}```\n\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%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%r14\n\t.cfi_def_cfa_offset 1... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%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\n#include <stdio.h>\n\nint main(void)\n{\n\tint n, m, sum, hit, i;\n\t\n\twhile (scanf(\"%d\", &n), n != 0){\n\t\tsum = 0;\n\t\tfor (i = 0; i < n / 4; i++){\n\t\t\tscanf(\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(){\n\tint n, m;\n\tscanf(\"%d %d\", &n, &m);\n\t\n\tint a=0, b=0;\n\tfor(int i=2; i<=n; i++){\n\t\ta = a+i-1;\n\t}\n\tfor(int j=2; j<=m; j++){... | 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\"\n\t.section\t.text.startup,\"ax\",@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.LC1:\n\t.string\t\"%d %d\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\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 CAKE(int Sum, int n)\n{\n int ret;\n ret=Sum/n;\n\tif(Sum%n!=0)\n\t{ \n\t\tret++;\n\t}\n\treturn ret;\n}\n\nint main(void)\n{\n\tint N,C,Sum=... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tCAKE\n\t.type\tCAKE, @function\nCAKE:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tcltd\n\tidivl\t%esi\n\tcmpl\t$1, %edx\n\tsbbl\t$-1, %eax\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tCAKE, .-CAKE\n\t.section\t.rodata.... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tCAKE\n\t.type\tCAKE, @function\nCAKE:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tcltd\n\tidivl\t%esi\n\tcmpl\t$1, %edx\n\tsbbl\t$-1, %eax\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tCAKE, .-CAKE\n\t.section\t.rodata.str1.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>\n#include <stdlib.h>\n#include <math.h>\n\n/* define*/\n#define Yes(X) puts ( X ? \"Yes\" : \"No\")\n#define YES(X) puts ( X ? \"Y... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmp\n\t.type\tcmp, @function\ncmp:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.size\tcmp, .-cmp\n\t.p2align 4\n\t.globl\tcmp2\n\t.type\tcmp2, @function\ncmp2:... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmp\n\t.type\tcmp, @function\ncmp:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.size\tcmp, .-cmp\n\t.p2align 4\n\t.globl\tcmp2\n\t.type\tcmp2, @function\ncmp2:\n.LFB... |
train | [
{
"content": "Given the following C 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\nlong long val(long long x){\n long long sum = 0;\n while(x){\n sum += x%10;\n x /= 10;\n }\n return sum;\n}\n\nint main(){\n long long a,... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tval\n\t.type\tval, @function\nval:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%r8d, %r8d\n\ttestq\t%rdi, %rdi\n\tje\t.L1\n\tmovabsq\t$7378697629483820647, %rcx\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovq\t%rdi, %rax\n\timulq\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tval\n\t.type\tval, @function\nval:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%r8d, %r8d\n\ttestq\t%rdi, %rdi\n\tje\t.L1\n\tmovabsq\t$7378697629483820647, %rcx\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovq\t%rdi, %rax\n\timulq\t%rcx\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\nmain(a){scanf(\"%d\",&a);printf(\"%d\",(a=sqrt(a))*a);}```\n\nAssembly Code:\n\n```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 1... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\nint main(void)\n{\n int w[50],a,b,d,i,j=0,k,n,p,x,y=0,z=0;\n char s[500],c[500];\n\n scanf(\"%d\",&n);\n\n for (size_t 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.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\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%r13\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main()\n{\n\tint n,c;\n\tscanf( \"%u\", &n );\n\tif ( ( n %2 ) == 0 )\n\t\tc = ( n / 2 ) - 1;\n\telse\n\t\tc = n / 2;\n\tprintf(\"%i\",c);\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\"%u\"\n.LC1:\n\t.string\t\"%i\"\n\t.section\t.text.startup,\"ax\",@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... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%u\"\n.LC1:\n\t.string\t\"%i\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp... |
train | [
{
"content": "Given the following C 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 int i;\n\n scanf(\"%d\", &n);\n printf(\"%d:\", n);\n\n while (n % 2 == 0){\n printf(\" %d\", 2);... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d:\"\n.LC2:\n\t.string\t\" %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_start... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d:\"\n.LC2:\n\t.string\t\" %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\n\nint main(void)\n{\n\tint id;\n\n\twhile (scanf(\"%d\", &id), id){\n\t\tchar oct[16];\n\t\tint i;\n\n\t\tsprintf(oct, \"%o\", id... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%o\"\n.LC2:\n\t.string\t\"\"\n.LC3:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"01235789\"\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\"%o\"\n.LC2:\n\t.string\t\"\"\n.LC3:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"01235789\"\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\nint main (void) {\n long long n;\n scanf(\"%lld\", &n);\n printf(\"%lld\\n\", (n-1)*n/2);\n return EXIT_SUCCESS;\n}... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n.LC1:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tsu... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n.LC1:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$2... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void)\n{\n long long int x,ans=0;\n scanf(\"%lld\", &x);\n ans+=(x-(x%11))/11*2;\n if(x%11>=7) ans+=2;\n else if(x%11==0) ans+... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offse... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint num[200001];\nlong long ZZ(long long a, long long b)\n{\n return a > b ? a - b : b - a;\n}\nint main()\n{\n long long sum = 0;\n int n, i;... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tZZ\n\t.type\tZZ, @function\nZZ:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rdx\n\tmovq\t%rsi, %rax\n\tsubq\t%rsi, %rdx\n\tsubq\t%rdi, %rax\n\tcmpq\t%rsi, %rdi\n\tcmovg\t%rdx, %rax\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tZZ\n\t.type\tZZ, @function\nZZ:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rdx\n\tmovq\t%rsi, %rax\n\tsubq\t%rsi, %rdx\n\tsubq\t%rdi, %rax\n\tcmpq\t%rsi, %rdi\n\tcmovg\t%rdx, %rax\n\tret\n\t.cfi_endproc\n.LFE23:\n\t.size\tZZ, .... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\n\tint n,m,x,y,t;\n\n\tscanf(\"%d%d%d%d\",&n,&m,&x,&y);\n\twhile(n--){\n\t\tscanf(\"%d\",&t);\n\t\tx=x>t?x:t;\n\t}\n\twhile(m--){\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%d%d%d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"No \"\n.LC3:\n\t.string\t\"War\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @functi... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d%d%d\"\n.LC1:\n\t.string\t\"%d\"\n.LC2:\n\t.string\t\"No \"\n.LC3:\n\t.string\t\"War\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nma... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\n/** Application main entry point. */\nint main (\n int argc,\n char * argv[ ]\n )\n{\n int ds;\n\n scanf ( \"%d\", &ds );\n while ( ds-- ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d%d%d%d\"\n.LC2:\n\t.string\t\"%d%d\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @fun... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d%d%d%d\"\n.LC2:\n\t.string\t\"%d%d\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\... |
train | [
{
"content": "Given the following C 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>\nint main(void) {\n int l;\n scanf(\"%d\", &l);\n printf(\"%lf\", (double)l * l * l / 27);\n\n re... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\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.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$2... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\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.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rs... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <string.h>\nint main(void) {\n char s[101];\n scanf(\"%s\", s);\n int len = strlen(s);\n for(int i = 0; i < len; i++) {\n printf(\"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\"%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\ni=0,n,a[200009],x=0;main(){for(scanf(\"%d\",&n);i<n;i++){scanf(\"%d\",a+i);x^=a[i];}for(i=0;i<n;i++)printf(\"%d \",x^a[i]);}```\n\nAssembly Code:\n\n```assembly\n\t.file\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d \"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d \"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\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>\nint main(void)\n{\n int n,i,m,s=0;\n scanf(\"%d\",&n);\n m=n;\n while(m/10!=0){\n s+=m%10;\n m=m/10;\n }\n s+=m;\n i... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startp... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"Yes\"\n.LC2:\n\t.string\t\"No\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\nn,i=1;main(r){\nfor(scanf(\"%d\",&n),r=n;i*i<=n;)if(n%++i==0)for(r=1.*r*(i-1)/i;n%i==0;n/=i);\nif(--n)r=1.*r*n/++n;\nn=!printf(\"%d\\n\",r);\n}```\n\nAssembly Code:\n\n``... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\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.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleaq\tn... | {
"answer": "```assembly\n\t.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.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleaq\tn(%rip)... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nchar str[21];\nchar az[21];\nchar*sp,*azp;\nshort i;\n\nint main(void){\nscanf(\"%s\",str);\nsp = str;\nazp = az;\nwhile(*sp){\nif(i){\nif(*sp == 'Z'... | code | {
"ground_truth": "```assembly\n\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\"-1\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\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\"-1\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\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{\nint H,W,A,B;\n(void)scanf(\"%d %d %d %d\",&H,&W,&A,&B);\n\tfor (int i=0; i<H; i++) {\n\t\tfor (int j=0; j<W; j++) {\n\t\t\tp... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d\"\n\t.section\t.text.startup,\"ax\",@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_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 %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_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(){\n int n,m;\n int sum=0;\n int count=0;\n scanf(\"%d%d\",&n,&m);\n int a[n];\n for(int 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%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\tint N;\n\tint array[100];\n\tint sum=0;\n\tfloat ave=0;\n\tfloat a=0;\n\tfloat b=0;\n\tint answer=0;\n\tscanf(\"%d\",&N);\n\tif(N < 1... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%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\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n\nint main() {\n\n int n;\n\n scanf(\"%d\", &n);\n\n printf(\"%d\", n * 800 - (n / 15)*200);\n\n\n ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\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\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%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\no[1<<20],n,r;\nmain(i){\n for(;++i<999;)\n if(!o[i])\n for(r=i+i;r<1<<20;r+=i)\n o[r]=1;\n for(;scanf(\"%d\",&n),n;printf(\"%d\\n\",r))\n for(i=1,r=0;++i<=n/2;)\n ... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\\n\"\n.LC1:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\n... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<string.h>\nint main(void){\n char str[222];\n scanf(\"%s\",str);\n int n=strlen(str);\n for(int loop=n-2;loop;loop-=2){\n if(strncmp(st... | code | {
"ground_truth": "```assembly\n\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%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#include<string.h>\n#include<stdlib.h>\n#include<math.h>\n#define max(x,y)(x>y?x:y)\n#define min(x,y)(x>y?y:x)\ntypedef long long int ll;\ntypedef unsi... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tasc_cmp\n\t.type\tasc_cmp, @function\nasc_cmp:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rsi), %edx\n\tmovl\t$-1, %eax\n\tcmpl\t%edx, (%rdi)\n\tjl\t.L1\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n.L1:\n\tret\n\t.cfi_endproc\n.LFE51:\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tasc_cmp\n\t.type\tasc_cmp, @function\nasc_cmp:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rsi), %edx\n\tmovl\t$-1, %eax\n\tcmpl\t%edx, (%rdi)\n\tjl\t.L1\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n.L1:\n\tret\n\t.cfi_endproc\n.LFE51:\n\t.si... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main()\n{\n int a;\n scanf(\"%d\",&a);\n if(a%2==0){\n printf(\"%d\\n\",a/2);\n }\n if(a%2!=0){\n printf(\"%d\\n\",... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\n int N,x;\n scanf(\"%d\",&N);\n x=N/3;\n if(N>=3)\n printf(\"%d\\n\",x);\n else\n printf(\"0\\n\",x);\n return 0... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"0\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_st... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"0\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startpro... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<string.h>\nint main()\n{\n\tchar s[100005];\n\tscanf(\"%s\",s);\n\tint n=strlen(s);\n\tint i;\n\tint g,p;\n\tg=p=0;\n\tint ans=0;\n\tfor(i=0;i... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbx\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main ()\n{\n\tchar a [4] [4];\n\tint i, j;\n\n\tfor (i = 0; i < 3; i ++) {\n\t\tfor (j = 0; j < 3; j ++) scanf (\" %c\", &a [i] [j]);\n\t}\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\"\n.LC1:\n\t.string\t\"%c%c%c\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\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\" %c\"\n.LC1:\n\t.string\t\"%c%c%c\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r1... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n#include <ctype.h>\n#include <memory.h>\nint main(void){\n int n,i,o,min,max,t;\n char line[1025],line1[52];\n scanf(\"%d\",&n);\n for(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\"%s\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB37:\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.LFB37:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\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 char s[5];\n scanf(\"%s\",s);\n for(int i=0;i<3;i++){\n if(s[i]==s[i+1]){\n printf(\"Bad\\n\");\n return 0;\n }... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"Bad\"\n.LC2:\n\t.string\t\"Good\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"Bad\"\n.LC2:\n\t.string\t\"Good\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(){\n int n,sum,max;\n scanf(\"%d\",&n);\n int l[n];\n sum= 0;\n for(int i =0 ;i < n;i++){\n scanf(\"%d\",&l[i]);\n sum += l[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\"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>\nint main()\n{\n\tint n;\n\tscanf(\"%d\", &n);\n\tint i;\n\tint p[200005];\n\tfor (i = 0; i < n; i++)\n\t\tscanf(\"%d\", &p[i]);\n\tint a[200005];\n\tfo... | code | {
"ground_truth": "```assembly\n\t.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>\nint main(){\n\tlong s;int i,d,min=999;\n\tscanf(\"%ld\",&s);\n\tfor(i=0;i<8;i++){\n\td=abs(s%1000-753);\n\tmin=(min>d?d:min);\n\ts/=10;\n\t}\nprintf(\"... | code | {
"ground_truth": "```assembly\n\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\"%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$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\"%ld\"\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, %rs... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n\n#include<stdio.h>\nint main()\n{\n int N, m, min=10000001, i, sum=0, sum1=0, count=0;\n scanf(\"%d%d\",&N, &m);\n int L[N];\n\n for(i=0; 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.LC1:\n\t.string\t\"%d%d\"\n.LC2:\n\t.string\t\"%d\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\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.LC1:\n\t.string\t\"%d%d\"\n.LC2:\n\t.string\t\"%d\"\n.LC3:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\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 h1, h2;\n int k1, k2;\n int sh, sk;\n int a, b, c, d;\n\n scanf(\"%d %d\", &h1, &h2);\n scanf(\"%d %d\", &... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"%d %d %d %d\"\n.LC2:\n\t.string\t\"hiroshi\"\n.LC3:\n\t.string\t\"kenjiro\"\n.LC4:\n\t.string\t\"even\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align... | {
"answer": "```assembly\n\t.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 %d %d\"\n.LC2:\n\t.string\t\"hiroshi\"\n.LC3:\n\t.string\t\"kenjiro\"\n.LC4:\n\t.string\t\"even\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main()\n{\nint n,i;\n scanf(\"%d\",&n);\n for(i=n;i<=10^9;i++)\n {\n if(i%2==0 && i%n==0)\n {\n printf(\"%d\",i);... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset ... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void){\n int n,m,target[100],point[100]={0};\n int i,j;\n int t,count;\n\n scanf(\"%d%d\",&n,&m);\n for(i=0;i<m;i++){\n\tscanf(... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%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()\n{\n\n int A[ 210 ];\n int m, min, max, dummy, gap, line;\n int i;\n\n while( scanf( \"%d %d %d\", &m, &min, &max ), m ){\n\n gap =... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"%d %d %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cf... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n.LC2:\n\t.string\t\"%d %d %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_star... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main(void)\n{\n\tint a,f,i;\n\tdouble b[110],c=101,d,e,x=0;\n\tscanf(\"%d\",&a);\n\tfor(i=0;i<a;i++){\n\t\tscanf(\"%lf\",&b[i]);\n\t\tx=x+b[i];\... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC2:\n\t.string\t\"%d\"\n.LC3:\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\tpushq\t%... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC2:\n\t.string\t\"%d\"\n.LC3:\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\tpushq\t%r15\n\... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main()\n{\n int n,m;\n int a[51],b[51],c[51][51],ans[51];\n int i,j;\n scanf(\"%d%d\",&n,&m);\n for(i=0;i<m;i++){\n scanf(\"%d%d\",&a[i],... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d%d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@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 <float.h>\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint main (void) {\n int i;\n int n, t, a;\n int h;\n float tem... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC1:\n\t.string\t\"%d%d%d\"\n.LC2:\n\t.string\t\"%d\"\n.LC5:\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.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.LC1:\n\t.string\t\"%d%d%d\"\n.LC2:\n\t.string\t\"%d\"\n.LC5:\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.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\nL[3],n,r;\nM(int*a,int*b){return*a-*b;}\nmain(){\n\tfor(;scanf(\"%d%d%d%d\",L,L+1,L+2,&n),*L;){\n\t\tqsort(L,3,4,M);\n\t\tfor(;n--;){\n\t\t\tscanf(\"%d\",&r);\n\t\t\tputs... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tM\n\t.type\tM, @function\nM:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE0:\n\t.size\tM, .-M\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\... | {
"answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tM\n\t.type\tM, @function\nM:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE0:\n\t.size\tM, .-M\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:... |
train | [
{
"content": "Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include <string.h>\n\nchar CheckWeather(char* a_acWeather);\n\nint main(void) {\n\tchar acWeather[7];\n\t//天気を入力\n\tscanf(\"%s\", acWeather);\n\t\n\t/... | code | {
"ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"Sunny\"\n.LC1:\n\t.string\t\"Cloudy\"\n\t.text\n\t.p2align 4\n\t.globl\tCheckWeather\n\t.type\tCheckWeather, @function\nCheckWeather:\n.LFB36:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\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\"Sunny\"\n.LC1:\n\t.string\t\"Cloudy\"\n\t.text\n\t.p2align 4\n\t.globl\tCheckWeather\n\t.type\tCheckWeather, @function\nCheckWeather:\n.LFB36:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.